Ejemplo n.º 1
0
 public string Search(IContext context)
 {
     if (!context.Ajax)
     {
         var log  = new SysLogModel(context: context);
         var html = SearchIndexUtilities.Search(context: context);
         log.Finish(context: context, responseSize: html.Length);
         return(html);
     }
     else
     {
         var log  = new SysLogModel(context: context);
         var json = SearchIndexUtilities.SearchJson(context: context);
         log.Finish(context: context, responseSize: json.Length);
         return(json);
     }
 }
Ejemplo n.º 2
0
 public ActionResult Search()
 {
     if (!Libraries.Requests.Request.IsAjaxRequest(Request))
     {
         var log  = new SysLogModel();
         var html = SearchIndexUtilities.Search();
         ViewBag.HtmlBody = html;
         log.Finish(html.Length);
         return(View());
     }
     else
     {
         var log  = new SysLogModel();
         var json = SearchIndexUtilities.SearchJson();
         log.Finish(json.Length);
         return(Content(json));
     }
 }
Ejemplo n.º 3
0
        public ActionResult Search()
        {
            var context = new Context();

            if (!Request.IsAjaxRequest())
            {
                var log  = new SysLogModel(context: context);
                var html = SearchIndexUtilities.Search(context: context);
                ViewBag.HtmlBody = html;
                log.Finish(context: context, responseSize: html.Length);
                return(View());
            }
            else
            {
                var log  = new SysLogModel(context: context);
                var json = SearchIndexUtilities.SearchJson(context: context);
                log.Finish(context: context, responseSize: json.Length);
                return(Content(json));
            }
        }