Ejemplo n.º 1
0
        public async Task <IActionResult> AddAddressCancelAsync()
        {
            var cacheModel = await _cacheService.GetAsync <AddAddressViewModel>(CacheKey);

            if (cacheModel == null)
            {
                return(RedirectToRoute(RouteConstants.PageNotFound));
            }

            var viewModel = new AddAddressCancelViewModel();

            return(View(viewModel));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> AddAddressCancelAsync(AddAddressCancelViewModel viewModel)
        {
            if (viewModel.CancelAddAddress)
            {
                await _cacheService.RemoveAsync <AddAddressViewModel>(CacheKey);

                return(RedirectToRoute(RouteConstants.Home));
            }
            else
            {
                return(RedirectToRoute(RouteConstants.AddAddressCheckAndSubmit));
            }
        }
Ejemplo n.º 3
0
 public override void Given()
 {
     ViewModel = new AddAddressCancelViewModel {
         CancelAddAddress = true
     };
 }