Example #1
0
        public JsonResult LoadBrowsers(DataTableParamModel param)
        {
            // Browser list
            var totalBrowserList = SrvBrowser.ListOfBrowsers();

            var filteredBrowserList = totalBrowserList.Skip(param.iDisplayStart).Take(param.iDisplayLength);

            var filteredResult = from b in filteredBrowserList
                                 select new[] { b.Engine, b.Browser, b.Platform, b.Version, b.Grade };

            return(Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = totalBrowserList.Count(),
                iTotalDisplayRecords = totalBrowserList.Count(),
                aaData = filteredResult
            },
                        JsonRequestBehavior.AllowGet));
        }