Пример #1
0
 public ActionResult Index()
 {
     if (!Libraries.Requests.Request.IsAjaxRequest(Request))
     {
         var log  = new SysLogModel();
         var html = GroupUtilities.Index(
             ss: SiteSettingsUtilities.GroupsSiteSettings());
         ViewBag.HtmlBody = html;
         log.Finish(html.Length);
         return(View());
     }
     else
     {
         var log  = new SysLogModel();
         var json = GroupUtilities.IndexJson(
             ss: SiteSettingsUtilities.GroupsSiteSettings());
         log.Finish(json.Length);
         return(Content(json));
     }
 }
 public string Index(Context context)
 {
     if (!context.Ajax)
     {
         var log  = new SysLogModel(context: context);
         var html = GroupUtilities.Index(
             context: context,
             ss: SiteSettingsUtilities.GroupsSiteSettings(context: context));
         log.Finish(context: context, responseSize: html.Length);
         return(html);
     }
     else
     {
         var log  = new SysLogModel(context: context);
         var json = GroupUtilities.IndexJson(
             context: context,
             ss: SiteSettingsUtilities.GroupsSiteSettings(context: context));
         log.Finish(context: context, responseSize: json.Length);
         return(json);
     }
 }
Пример #3
0
        public ActionResult Index()
        {
            var context = new Context();

            if (!Request.IsAjaxRequest())
            {
                var log  = new SysLogModel(context: context);
                var html = GroupUtilities.Index(
                    context: context,
                    ss: SiteSettingsUtilities.GroupsSiteSettings(context: context));
                ViewBag.HtmlBody = html;
                log.Finish(context: context, responseSize: html.Length);
                return(View());
            }
            else
            {
                var log  = new SysLogModel(context: context);
                var json = GroupUtilities.IndexJson(
                    context: context,
                    ss: SiteSettingsUtilities.GroupsSiteSettings(context: context));
                log.Finish(context: context, responseSize: json.Length);
                return(Content(json));
            }
        }