void btnSave_Click(object sender, EventArgs e)
{
try
{
CMS.Core.Entities.Category category = new Core.Entities.Category();
category.CreationDate = DateTime.Now;
category.Description = txtDescription.Text;
category.ID = 0;
category.IsDeleted = false;
category.LanguageID = CMSContext.LanguageID;
category.ModuleID = Convert.ToInt32(ViewState[CMSViewStateManager.ModuleID]);
category.Name = txtName.Text;
category.Order = Convert.ToInt32(txtOrderNumber.Text);
category.PortalID = CMSContext.PortalID;
category.ParentID = Convert.ToInt32(cddParentCategory.SelectedValue);
category.CreatedBy = CMSContext.CurrentUserID;
CategoryManager.Add(category);
BeginAddMode();
FillCategoryTree();
upnlCategory.Update();
}
catch (Exception ex)
{
dvProblems.Visible = true;
dvProblems.InnerText = ex.ToString();
upnlCategory.Update();
}
}
#endregion