void BeginEditMode()
{
if (ViewState[CMSViewStateManager.CategoryID] != null)
{
CMS.Core.Entities.Category category = CategoryManager.GetCategory(Convert.ToInt32(ViewState[CMSViewStateManager.CategoryID]));
if (category != null)
{
pnlCategoryItem.Visible = true;
txtDescription.Text = category.Description;
txtName.Text = category.Name;
txtOrderNumber.Text = category.Order.ToString();
cddParentCategory.Category = CMSConfig.ConstantManager.CategoryCategory + ViewState[CMSViewStateManager.ModuleID] + CMSConfig.ConstantManager.BreakItem + CMSConfig.ConstantManager.CurrentCategory + category.ID;
cddParentCategory.SelectedValue = category.ParentID.ToString();
btnSave.Visible = false;
btnUpdate.Visible = true;
pnlCategoryItem.DefaultButton = btnUpdate.ID;
}
}
}
#endregion