Пример #1
0
        public JsonResult Table(dtParam param)
        {
            var        query = db.Suppliers.AsNoTracking();
            dtSupplier res   = new dtSupplier();

            res.data            = res.GetData(param, query);
            res.draw            = param.Draw;
            res.recordsTotal    = query.Count();
            res.recordsFiltered = res.Count(param, query);
            return(Json(res));
        }
Пример #2
0
        public JsonResult ReportData(dtParam param)
        {
            var        query = db.Suppliers.AsNoTracking().Where(s => s.Address.Contains("минск"));
            dtSupplier res   = new dtSupplier();

            res.data            = res.GetData(param, query);
            res.draw            = param.Draw;
            res.recordsTotal    = db.Suppliers.AsNoTracking().Count();
            res.recordsFiltered = res.Count(param, query);
            return(Json(res));
        }