/// <summary> /// Handles the Click event of the btnSave control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void btnSave_Click(object sender, EventArgs e) { try { _selectedSimpleHtml.RegionId = base.RegionId; _selectedSimpleHtml.Html = HttpUtility.HtmlEncode(txtHtml.Value); _selectedSimpleHtml.Save(WebUtility.GetUserName()); MasterPage.MessageCenter.DisplaySuccessMessage(LocalizationUtility.GetText("lblPageSaved")); } catch (Exception ex) { MasterPage.MessageCenter.DisplayFailureMessage(string.Format(LocalizationUtility.GetText("lblCriticalError"), ex.Message)); } }
public void Insert(int RegionId,string Html,string CreatedBy,DateTime CreatedOn,string ModifiedBy,DateTime ModifiedOn) { SimpleHtml item = new SimpleHtml(); item.RegionId = RegionId; item.Html = Html; item.CreatedBy = CreatedBy; item.CreatedOn = CreatedOn; item.ModifiedBy = ModifiedBy; item.ModifiedOn = ModifiedOn; item.Save(UserName); }