示例#1
0
        public virtual ActionResult Index()
        {
            DashboardViewModel viewModel = new DashboardViewModel();
            viewModel.TotalUserCount = membershipService.GetAllUsers().Count.ToString();
            viewModel.TotalUsersOnlineCount = membershipService.GetNumberOfUsersOnline().ToString();
            viewModel.TotalRolesCount = roleService.GetAllRoles().Length.ToString();

            return View(viewModel);
        }
示例#2
0
        public virtual ActionResult Index()
        {
            DashboardViewModel viewModel = new DashboardViewModel();
            int totalRecords;

            membershipService.GetAllUsers(0, 20, out totalRecords);
            viewModel.TotalUserCount = totalRecords.ToString();
            viewModel.TotalUsersOnlineCount = membershipService.GetNumberOfUsersOnline().ToString();
            viewModel.TotalRolesCount = roleService.GetAllRoles().Length.ToString();
            viewModel.TotalActionsCount = actionRepo.Find().Count.ToString();
            viewModel.TotalModulesCount = moduleRepo.Find().Count.ToString();
            //viewModel.TotalJabatanCount = jabatanRepo.Find().Count.ToString();

            return View(viewModel);
        }