public async Task <IActionResult> AddOrganisation(AddOrganisationViewModel model)
        {
            if (model == null)
            {
                model = new AddOrganisationViewModel();
            }

            model.ProviderTypes = await _apiClient.GetProviderTypes();

            _sessionService.SetAddOrganisationDetails(model);

            return(View(model));
        }
예제 #2
0
        public async Task <IActionResult> GetApplicationRoutes()
        {
            var providerTypes = await _retryPolicy.ExecuteAsync(context => _apiClient.GetProviderTypes(), new Context());

            var applicationRoutes = Mapper.Map <IEnumerable <ApplicationRoute> >(providerTypes);

            return(Ok(applicationRoutes));
        }
예제 #3
0
        public async Task <IActionResult> AddProviderType()
        {
            var addOrganisationModel = _sessionService.GetAddOrganisationDetails();

            if (string.IsNullOrEmpty(addOrganisationModel?.LegalName))
            {
                return(Redirect("organisations-details"));
            }

            var model = Mapper.Map <AddOrganisationProviderTypeViewModel>(addOrganisationModel);


            model.ProviderTypes = await _apiClient.GetProviderTypes();

            ModelState.Clear();
            return(View("~/Views/Roatp/AddProviderType.cshtml", model));
        }