Exemplo n.º 1
0
        public ActionResult Index()
        {
            var projects = _projectFactory.GetAllProjects();

            ViewBag.totalCount   = projects == null ? 0 : projects.Count;
            ViewBag.finishCount  = projects == null ? 0 : projects.Where(p => p.CurrentStep != null && p.CurrentStep.StepOrder == (int)RouteStep.发货).Count();
            ViewBag.designCount  = projects == null ? 0 : projects.Where(p => p.CurrentStep != null && p.CurrentStep.StepOrder == (int)RouteStep.设计).Count();
            ViewBag.productCount = projects == null ? 0 : projects.Where(p => p.CurrentStep != null && p.CurrentStep.StepOrder == (int)RouteStep.生产).Count();
            ViewBag.housingCount = projects == null ? 0 : projects.Where(p => p.CurrentStep != null && p.CurrentStep.StepOrder == (int)RouteStep.入库).Count();
            return(View());
        }
Exemplo n.º 2
0
 // GET: Project
 public ActionResult Index()
 {
     ViewBag.projects = _projectFactory.GetAllProjects() ?? new List <Project>();;
     return(View());
 }