public JsonResult LoadData(int page, int pageSize = 3) { var model = _ClientAppService.GetAll(); var model1 = _CategorieClientAppService.GetAll(); model1 = model1.OrderBy(x => x.Designation); var model2 = _DeviseAppService.GetAll(); model2 = model2.OrderBy(x => x.Designation); int totalRow = model.Count(); model = model.OrderByDescending(x => x.CodeInterne) .Skip((page - 1) * pageSize) .Take(pageSize); return(Json(new { data = model, total = totalRow, status = true, droplist = model1, droplist1 = model2 }, JsonRequestBehavior.AllowGet)); }
public JsonResult LoadData(int page, int pageSize = 3) { var model = _CategorieClientAppService.GetAll(); int totalRow = model.Count(); model = model.OrderByDescending(x => x.code) .Skip((page - 1) * pageSize) .Take(pageSize); return(Json(new { data = model, total = totalRow, status = true }, JsonRequestBehavior.AllowGet)); }