Esempio n. 1
0
        public IActionResult SubmitConfirmChangeRoute(ConfirmChangeRouteViewModel model)
        {
            if (!ModelState.IsValid)
            {
                model.ErrorMessages = new List <ValidationErrorDetail>();

                var modelErrors = ModelState.Values.SelectMany(v => v.Errors);
                foreach (var modelError in modelErrors)
                {
                    model.ErrorMessages.Add(new ValidationErrorDetail
                    {
                        Field        = "ConfirmChangeRoute",
                        ErrorMessage = modelError.ErrorMessage
                    });
                }

                return(View("~/Views/Roatp/ConfirmChangeRoute.cshtml", model));
            }

            if (model.ConfirmChangeRoute == "Y")
            {
                return(RedirectToAction("ChangeApplicationProviderRoute", new { applicationId = model.ApplicationId }));
            }
            else
            {
                return(RedirectToAction("TaskList", "RoatpApplication", new { applicationId = model.ApplicationId }));
            }
        }
Esempio n. 2
0
        public IActionResult ConfirmChangeRoute(Guid applicationId)
        {
            var model = new ConfirmChangeRouteViewModel {
                ApplicationId = applicationId
            };

            PopulateGetHelpWithQuestion(model);
            return(View("~/Views/Roatp/ConfirmChangeRoute.cshtml", model));
        }