public ActionResult Edit(int id) { var context = new Context(); if (!Request.IsAjaxRequest()) { var log = new SysLogModel(context: context); var html = GroupUtilities.Editor( context: context, ss: SiteSettingsUtilities.GroupsSiteSettings(context: context), groupId: id, clearSessions: true); ViewBag.HtmlBody = html; log.Finish(context: context, responseSize: html.Length); return(View()); } else { var log = new SysLogModel(context: context); var json = GroupUtilities.EditorJson( context: context, ss: SiteSettingsUtilities.GroupsSiteSettings(context: context), groupId: id); log.Finish(context: context, responseSize: json.Length); return(Content(json)); } }
public ActionResult Edit(int id) { if (!Libraries.Requests.Request.IsAjaxRequest(Request)) { var log = new SysLogModel(); var html = GroupUtilities.Editor( SiteSettingsUtilities.GroupsSiteSettings(), id, clearSessions: true); ViewBag.HtmlBody = html; log.Finish(html.Length); return(View()); } else { var log = new SysLogModel(); var json = GroupUtilities.EditorJson( ss: SiteSettingsUtilities.GroupsSiteSettings(), groupId: id); log.Finish(json.Length); return(Content(json)); } }
public string Edit(Context context, int id) { if (!context.Ajax) { var log = new SysLogModel(context: context); var html = GroupUtilities.Editor( context: context, ss: SiteSettingsUtilities.GroupsSiteSettings(context: context), groupId: id, clearSessions: true); log.Finish(context: context, responseSize: html.Length); return(html); } else { var log = new SysLogModel(context: context); var json = GroupUtilities.EditorJson( context: context, ss: SiteSettingsUtilities.GroupsSiteSettings(context: context), groupId: id); log.Finish(context: context, responseSize: json.Length); return(json); } }