Beispiel #1
0
        public IEnumerable<Overhead> GetOverheadList(OverheadRequest request = null)
        {
            request = request ?? new OverheadRequest();
            using (var dbContext = new ProjectDbContext())
            {
                IQueryable<Overhead> Overhead = dbContext.Overheads;

                if (!string.IsNullOrEmpty(request.ProjectName))
                    Overhead = Overhead.Where(u => u.ProjectName.Contains(request.ProjectName));

                return Overhead.OrderByDescending(u => u.ID).ToPagedList(request.PageIndex, request.PageSize);
            }
        }
 public ActionResult Index(OverheadRequest request)
 {
     var result = this.ProjectService.GetOverheadList(request);
     return View(result);
 }