Пример #1
0
 public RegistrationModel()
 {
     Step1 = new RegistrationAccoutStep1Model();
     Step2 = new RegistrationAccoutStep2Model();
     Step3 = new RegistrationAccoutStep3Model();
     Step4 = new RegistrationAccoutStep4Model();
 }
Пример #2
0
        private ActionResult Step4_reCaptchaView(RegistrationAccoutStep4Model model, bool captchaValid, string captchaErrorMessage)
        {
            if (!captchaValid)
                return View(MVC.Account.Views.Registration.Step4_reCaptchaView, model);

            var regData = Session[CURRENT_REGISTRATION_MODEL] as RegistrationModel;
            var accountModel = new AccountModel
            {
                FirstName = regData.Step1.Username,
                AgreedToTermsDate = true
            };

            AccountDomain accountDomain = Mapper.Map<AccountDomain>(accountModel);

            ResultServiceOperation<AccountDomain> rez = _аccountService.Save(accountDomain);

            if (rez.ISSuccessfulOperation)
            {
                foreach (var er in rez.Errors)
                    ModelState.AddModelError(er.Key, er.Value);

                return RegistrationProcessing(MVC.Account.Views.Registration.Step4_reCaptchaView);
            }

            return RegistrationProcessing(MVC.Account.Views.Registration.Step5_Finish);
        }