Exemple #1
0
        public JsonResult Table(dtParam param)
        {
            var query = db.Orders.AsNoTracking();

            Models.DataTableModel.dtOrder res = new Models.DataTableModel.dtOrder();
            res.data            = res.GetData(param, query);
            res.draw            = param.Draw;
            res.recordsTotal    = query.Count();
            res.recordsFiltered = res.Count(param, query);
            return(Json(res));
        }
Exemple #2
0
        public JsonResult ReportData(dtParam param)
        {
            var query = db.Orders.AsNoTracking().Where(s => s.OrderDate <= param.repEnd && s.OrderDate >= param.repStart);

            Models.DataTableModel.dtOrder res = new Models.DataTableModel.dtOrder();
            res.data            = res.GetData(param, query);
            res.draw            = param.Draw;
            res.recordsTotal    = db.Orders.AsNoTracking().Count();
            res.recordsFiltered = res.Count(param, query);
            return(Json(res));
        }