Ejemplo n.º 1
0
        public JsonResult Table(dtParam param)
        {
            var       query = db.Products.AsNoTracking();
            dtProduct res   = new dtProduct();

            res.data            = res.GetData(param, query);
            res.draw            = param.Draw;
            res.recordsTotal    = query.Count();
            res.recordsFiltered = res.Count(param, query);
            return(Json(res));
        }
Ejemplo n.º 2
0
        public JsonResult Report0(dtParam param)
        {
            var       query = db.Products.AsNoTracking().Where(p => p.Balance == 0);
            dtProduct res   = new dtProduct();

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