/// <summary> /// Handles the Delete event of the gEmailTemplates control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RowEventArgs" /> instance containing the event data.</param> protected void gEmailTemplates_Delete(object sender, RowEventArgs e) { EmailTemplateService emailTemplateService = new EmailTemplateService(); EmailTemplate emailTemplate = emailTemplateService.Get((int)gEmailTemplates.DataKeys[e.RowIndex]["id"]); if (emailTemplate != null) { emailTemplateService.Delete(emailTemplate, CurrentPersonId); emailTemplateService.Save(emailTemplate, CurrentPersonId); } BindGrid(); }
public ActionResult Delete(Guid id) { var result = service.Delete(id, SessionManager.UserID); return(Json(result, JsonRequestBehavior.AllowGet)); }