void btnUpdate_Click(object sender, EventArgs e)
{
if (ViewState[CMSViewStateManager.CategoryID] != null)
{
try
{
CMS.Core.Entities.Category category = CategoryManager.GetCategory(Convert.ToInt32(ViewState[CMSViewStateManager.CategoryID]));
if (category != null)
{
category.Description = txtDescription.Text;
category.IsDeleted = false;
category.LanguageID = CMSContext.LanguageID;
category.Name = txtName.Text;
category.Order = Convert.ToInt32(txtOrderNumber.Text);
category.PortalID = CMSContext.PortalID;
category.ParentID = Convert.ToInt32(cddParentCategory.SelectedValue);
CategoryManager.Update(category);
FillCategoryTree();
upnlCategory.Update();
}
}
catch (Exception ex)
{
dvProblems.Visible = true;
dvProblems.InnerText = ex.ToString();
upnlCategory.Update();
}
}
}
#endregion