public async Task <IActionResult> AddOrganisation(AddOrganisationViewModel model) { if (model == null) { model = new AddOrganisationViewModel(); } model.ProviderTypes = await _apiClient.GetProviderTypes(); _sessionService.SetAddOrganisationDetails(model); return(View(model)); }
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)); }
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)); }