public JsonResult Table(dtParam param) { dtEmployee res = new dtEmployee(); res.data = res.GetData(param, db.Employees.AsNoTracking()); res.draw = param.Draw; res.recordsTotal = db.Employees.AsNoTracking().Count(); res.recordsFiltered = res.Count(param, db.Employees); return(Json(res)); }
public JsonResult ReportData(dtParam param) { dtEmployee res = new dtEmployee(); var query = db.Employees.AsNoTracking().Where(emp => (DateTime.Now.Year - emp.BirstDate.Value.Year) * 8755.2 > 525312); res.data = res.GetData(param, query); res.draw = param.Draw; res.recordsTotal = db.Employees.AsNoTracking().Count(); res.recordsFiltered = res.Count(param, query); return(Json(res)); }