Beispiel #1
0
        public ActionResult Edit(int id)
        {
            var context = new Context();

            if (!Request.IsAjaxRequest())
            {
                var log  = new SysLogModel(context: context);
                var html = UserUtilities.Editor(
                    context: context,
                    ss: SiteSettingsUtilities.UsersSiteSettings(context: context),
                    userId: id,
                    clearSessions: true);
                ViewBag.HtmlBody = html;
                log.Finish(context: context, responseSize: html.Length);
                return(View());
            }
            else
            {
                var log  = new SysLogModel(context: context);
                var json = UserUtilities.EditorJson(
                    context: context,
                    ss: SiteSettingsUtilities.UsersSiteSettings(context: context),
                    userId: id);
                log.Finish(context: context, responseSize: json.Length);
                return(Content(json));
            }
        }
Beispiel #2
0
 public ActionResult Edit(int id)
 {
     if (!Libraries.Requests.Request.IsAjaxRequest(Request))
     {
         var log  = new SysLogModel();
         var html = UserUtilities.Editor(
             SiteSettingsUtilities.UsersSiteSettings(),
             id,
             clearSessions: true);
         ViewBag.HtmlBody = html;
         log.Finish(html.Length);
         return(View());
     }
     else
     {
         var log  = new SysLogModel();
         var json = UserUtilities.EditorJson(
             ss: SiteSettingsUtilities.UsersSiteSettings(),
             userId: 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 = UserUtilities.Editor(
             context: context,
             ss: SiteSettingsUtilities.UsersSiteSettings(context: context),
             userId: id,
             clearSessions: true);
         log.Finish(context: context, responseSize: html.Length);
         return(html);
     }
     else
     {
         var log  = new SysLogModel(context: context);
         var json = UserUtilities.EditorJson(
             context: context,
             ss: SiteSettingsUtilities.UsersSiteSettings(context: context),
             userId: id);
         log.Finish(context: context, responseSize: json.Length);
         return(json);
     }
 }