コード例 #1
0
        private ProviderUserSearchResultsViewModel GetProviderUsers(string ukprn)
        {
            var provider = _providerService.GetProvider(ukprn);

            var viewModel = new ProviderUserSearchResultsViewModel
            {
                SearchViewModel = new ProviderUserSearchViewModel(),
                ProviderName    = $"{provider.TradingName} ({provider.Ukprn})",
                ProviderUsers   = _providerUserProvider.GetProviderUsers(ukprn).ToList()
            };

            return(viewModel);
        }
コード例 #2
0
        public ProviderUserSearchResultsViewModel SearchProviderUsers(ProviderUserSearchViewModel searchViewModel)
        {
            var searchParameters = new ProviderUserSearchParameters
            {
                Username            = searchViewModel.Username,
                Name                = searchViewModel.Name,
                Email               = searchViewModel.Email,
                AllUnverifiedEmails = searchViewModel.AllUnverifiedEmails
            };

            var providerUsers = _userProfileService.SearchProviderUsers(searchParameters);

            var viewModel = new ProviderUserSearchResultsViewModel
            {
                SearchViewModel = searchViewModel,
                ProviderUsers   = providerUsers.Select(Convert).ToList()
            };

            return(viewModel);
        }
コード例 #3
0
 public ActionResult SearchProviderUsers(ProviderUserSearchResultsViewModel viewModel)
 {
     viewModel.SearchViewModel.PerformSearch = true;
     return(RedirectToRoute(RecruitmentRouteNames.AdminProviderUsers, viewModel.SearchViewModel));
 }