예제 #1
0
        protected IActionResult CheckParentValidityAndRedirect(int submittedPageId)
        {
            var email         = session.GetString(CurrentPaEmail);
            var sectionLength = FormDefinition.GetSectionLength(FormSection.SignUp);
            var nextPageId    = submittedPageId + 1;

            if (submittedPageId + 1 != sectionLength)
            {
                var parent = accountCreationViewModelBuilder.Build(email);

                return(parent == null
                    ? RedirectToAction("Introduction", "SignUp")
                    : ValidateParentAndRedirect(parent, nextPageId));
            }

            return(RedirectToLastAction(FormSection.SignUp));
        }
        public IActionResult Index()
        {
            var publicRegisterSearchCriteria = SessionHelper.Get <PublicRegisterSearchCriteria>("publicRegisterSearchCriteria");
            var submitButtonType             = SessionHelper.GetString("publicRegisterSearchCriteria_submitButtonType");

            if (publicRegisterSearchCriteria != null && submitButtonType != null)
            {
                var publicRegisterLicenceListViewModel = publicRegisterViewModelBuilder.BuildEmptySearch();
                publicRegisterLicenceListViewModel.PublicRegisterSearchCriteria = publicRegisterSearchCriteria;

                publicRegisterLicenceListViewModel = HandlePostActions(publicRegisterLicenceListViewModel, submitButtonType);

                return(View(publicRegisterLicenceListViewModel));
            }
            else
            {
                var licences = publicRegisterViewModelBuilder.BuildEmptySearch();

                return(View(licences));
            }
        }