//
        // GET: /Crm/Project/

        public ActionResult Index(ProjectCtrlRequest requset)
        {
            var ProjectBasedataIDList = this.ProjectService.GetProjectBasedataList(new ProjectRequest());
            this.ViewBag.ProjectBasedataID = new SelectList(ProjectBasedataIDList, "ID", "PName");
            
            var result = this.ProjectService.GetProjectCtrlList(requset);
            return View(result);
        }
Example #2
0
        public IEnumerable<ProjectCtrl> GetProjectCtrlList(ProjectCtrlRequest request = null)
        {
            request = request ?? new ProjectCtrlRequest();
            using (var dbContext = new ProjectDbContext())
            {
                IQueryable<ProjectCtrl> projects = dbContext.ProjectCtrls;


                if (!string.IsNullOrEmpty(request.Name))

                    projects = projects.Where(u => u.Name.Contains(request.Name));

                //if (!string.IsNullOrEmpty(request.Stuffname))
                //    projects = projects.Where(u => u.Stuffname.Contains(request.Stuffname));

                //if (!string.IsNullOrEmpty(request.obb))
                //    projects = projects.Where(u => u.obb.Contains(request.obb));

                //if (!string.IsNullOrEmpty(request.Way))
                //    projects = projects.Where(u => u.Way.Contains(request.Way));

                return projects.OrderByDescending(u => u.ID).ToPagedList(request.PageIndex, request.PageSize);
            }
        }
Example #3
0
        //
        // GET: /Crm/Project/

        public ActionResult Index(ProjectCtrlRequest requset)
        {
            var result = this.ProjectService.GetProjectCtrlList(requset);
            return View(result);
        }