{ // // GET: /Basisdata/Classification/ public ActionResult Index(PayablesRequest request) { var result = this.ProjectService.GetPayablesList(request); return View(result); }
public IEnumerable<Payables> GetPayablesList(PayablesRequest request = null) { request = request ?? new PayablesRequest(); using (var dbContext = new ProjectDbContext()) { IQueryable<Payables> Payables = dbContext.Payables; if (!string.IsNullOrEmpty(request.Receivables)) Payables = Payables.Where(u => u.Receivables.Contains(request.Receivables)); return Payables.OrderByDescending(u => u.ID).ToPagedList(request.PageIndex, request.PageSize); } }