public ActionResult Index(InsMeasureRequest request)
        {
            var ProjectList = this.ProjectService.GetProjectBasedataList(new ProjectRequest());
            this.ViewBag.ProjectBasedataID = new SelectList(ProjectList, "ID", "PName");

            var result = this.ProjectService.GetInsMeasureList(request);
            return View(result);
        }
Beispiel #2
0
        public IEnumerable<InsMeasure> GetInsMeasureList(InsMeasureRequest request = null)
        {
            request = request ?? new InsMeasureRequest();
            using (var dbContext = new ProjectDbContext())
            {
                IQueryable<InsMeasure> InsMeasure = dbContext.InsMeasures.Include("ProjectBasedata");

                if (request.ProjectBasedataID > 0)
                    InsMeasure = InsMeasure.Where(d => d.ProjectBasedataID == request.ProjectBasedataID);

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