public JsonResult LoadData(int page, int pageSize = 3) { var model = _StockOutAppService.GetAll(); var model1 = _MagasinAppService.GetAll(); model1 = model1.OrderBy(x => x.libelle); var model2 = _PersonnelAppService.GetAll(); model2 = model2.OrderBy(x => x.Nom); int totalRow = model.Count(); model = model.OrderByDescending(x => x.Id) .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 = _PersonnelAppService.GetAll(); var model1 = _DepartementAppService.GetAll(); model1 = model1.OrderBy(x => x.Designation); int totalRow = model.Count(); model = model.OrderByDescending(x => x.Matricule) .Skip((page - 1) * pageSize) .Take(pageSize); return(Json(new { data = model, total = totalRow, status = true, droplist = model1 }, JsonRequestBehavior.AllowGet)); }