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


            var result = this.ProjectService.GetInsLaborCostList(request);
            return View(result);
        }
Beispiel #2
0
 public IEnumerable<InsLaborCost> GetInsLaborCostList(InsLaborCostRequest request = null)
 {
     request = request ?? new InsLaborCostRequest();
     using (var dbContext = new ProjectDbContext())
     {
         IQueryable<InsLaborCost> InsLaborCost = dbContext.InsLaborCosts.Include("ProjectBasedata") ;
        
         //if (!string.IsNullOrEmpty(request.ProjectBasedataID))
             if (request.ProjectBasedataID>0)
             InsLaborCost = InsLaborCost.Where(d => d.ProjectBasedataID == request.ProjectBasedataID);
         
         return InsLaborCost.OrderByDescending(u => u.ID).ToPagedList(request.PageIndex, request.PageSize);
     }
 }