コード例 #1
0
        public ActionResult Stats()
        {
            var vendors     = AdminService.GetUsersByType("Vendor");
            var contractors = AdminService.GetUsersByType("Contractor");
            var users       = AdminService.GetUsersByType("User");
            var jobs        = JobService.GetAllJobs();

            var cats = CategoryAdminService.GetCategories();

            return(View(new DashboardPageModel
            {
                ContractorCount = contractors.Count,
                UserCount = users.Count,
                VendorsCount = vendors.Count,
                Categories = cats,
                JobsCount = jobs.Count
            }));
        }
コード例 #2
0
        public ActionResult ListView()
        {
            var data = CategoryAdminService.GetCategories();

            return(View(data));
        }