Ejemplo n.º 1
0
        public async Task <IActionResult> SaveAddress(AddressViewModel model)
        {
            session.SetSubmittedPage(FormSection.SignUp, 3);

            if (!ModelState.IsValid)
            {
                // have to repopulate dropdowns as lost during post
                model.Countries = ReferenceDataProvider.GetCountries();
                model.Counties  = ReferenceDataProvider.GetCounties();

                return(View(GetViewPath(FormSection.SignUp, 3), model));
            }

            await accountCreationPostDataHandler.UpdateAddressAsync(session.GetString(CurrentPaEmail), model);

            return(CheckParentValidityAndRedirect(3));
        }