void btnUpdate_Click(object sender, EventArgs e)
{
if (ViewState[CMSViewStateManager.TemplateID] != null)
{
try
{
CMS.Core.Entities.Template template = TemplateManager.GetTemplate(Convert.ToInt32(ViewState[CMSViewStateManager.TemplateID]));
if (template != null)
{
template.Description = txtDescription.Text;
template.IsDeleted = false;
template.LanguageID = CMSContext.LanguageID;
template.Name = txtName.Text;
template.PortalID = CMSContext.PortalID;
TemplateManager.Update(template);
FillTemplates(-1);
upnlTemplate.Update();
}
}
catch (Exception ex)
{
dvProblems.Visible = true;
dvProblems.InnerText = ex.ToString();
upnlTemplate.Update();
}
}
}
#endregion