Example #1
0
 public ActionResult Index(IncomeRequest request)
 {
     var model = new Income();
     //this.RenderMyViewData(model);
     var result = this.ProjectService.GetIncomeList(request);            
     return View(result);
 }
Example #2
0
        public IEnumerable<Income> GetIncomeList(IncomeRequest request = null)
        {
            request = request ?? new IncomeRequest();
            using (var dbContext = new ProjectDbContext())
            {
                IQueryable<Income> Income = dbContext.Incomes;

                if (!string.IsNullOrEmpty(request.RecObject))
                    Income = Income.Where(u => u.RecObject.Contains(request.RecObject));

                return Income.OrderByDescending(u => u.ID).ToPagedList(request.PageIndex, request.PageSize);
            }
        }