示例#1
0
        public ActionResult ForgotPassword(ForgotPasswordInput forgotPasswordInput)
        {
            if (ModelState.IsValid)
            {
                var message = new ForgotPasswordInputMessage {Input = forgotPasswordInput, Result = new ForgotPasswordResult()};

                Bus.Send(message);

                if (message.Result.Success)
                {
                    return View("forgotpasswordsent", (object) message.Result.Message);
                }

                ModelState.AddModelError("model", message.Result.Message);
            }
            return View(forgotPasswordInput);
        }
示例#2
0
        public ActionResult ForgotPassword(ForgotPasswordInput forgotPasswordInput)
        {
            if (ModelState.IsValid)
            {
                var message = new ForgotPasswordInputMessage {
                    Input = forgotPasswordInput, Result = new ForgotPasswordResult()
                };

                Bus.Send(message);

                if (message.Result.Success)
                {
                    return(View("forgotpasswordsent", (object)message.Result.Message));
                }

                ModelState.AddModelError("model", message.Result.Message);
            }
            return(View(forgotPasswordInput));
        }