void btnSave_Click(object sender, EventArgs e)
{
try
{
CMS.Core.Entities.Template template = new Core.Entities.Template();
template.CreationDate = DateTime.Now;
template.Description = txtDescription.Text;
template.ID = 0;
template.IsDeleted = false;
template.LanguageID = CMSContext.LanguageID;
template.Name = txtName.Text;
template.PortalID = CMSContext.PortalID;
template.CreatedBy = CMSContext.CurrentUserID;
TemplateManager.Add(template);
BeginAddMode();
FillTemplates(-1);
upnlTemplate.Update();
}
catch (Exception ex)
{
dvProblems.Visible = true;
dvProblems.InnerText = ex.ToString();
upnlTemplate.Update();
}
}
#endregion