Пример #1
0
        public ActionResult Index()
        {
            int usersCount       = userManager.Users.Where(x => x.UserName.ToLower() != "sadmin").Count();
            int activeUsersCount = userManager.Users.Where(x => x.UserName.ToLower() != "sadmin" && x.IsActive).Count();
            int roleCount        = roleManager.Roles.Count();
            int surveyorCount    = _surveyorRepository.GetAllSurveyor().Count();

            ViewBag.TotalUsers       = usersCount;
            ViewBag.TotalActiveUsers = activeUsersCount;
            ViewBag.TotalRoles       = roleCount;
            ViewBag.TotalSurveyors   = surveyorCount;
            return(View());
        }
Пример #2
0
        public IActionResult ListSurveyors()
        {
            var surveyors = _surveyorRepository.GetAllSurveyor();

            return(View(surveyors));
        }