示例#1
0
        public ActionResult Index(InsOverheadRequest request)
        {
            var ProjectList = this.ProjectService.GetProjectBasedataList(new ProjectRequest());

            this.ViewBag.ProjectBasedataID = new SelectList(ProjectList, "ID", "PName");

            var result = this.ProjectService.GetInsOverheadList(request);

            return(View(result));
        }
示例#2
0
        public IEnumerable <InsOverhead> GetInsOverheadList(InsOverheadRequest request = null)
        {
            request = request ?? new InsOverheadRequest();
            using (var dbContext = new ProjectDbContext())
            {
                IQueryable <InsOverhead> InsOverhead = dbContext.InsOverheads.Include("ProjectBasedata");

                if (request.ProjectBasedataID > 0)
                {
                    InsOverhead = InsOverhead.Where(d => d.ProjectBasedataID == request.ProjectBasedataID);
                }

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