Пример #1
0
 public ActionResult ForgotPassword(ForgotPasswordViewModel model)
 {
     try
     {
         if (!ModelState.IsValid)
         {
             return(View());
         }
         if (AccountDAL.CheckforUser(model))
         {
             return(RedirectToAction("SetPassword", "manage", new { @name = model.UserName, @email = model.Email }));
         }
         else
         {
             ModelState.AddModelError("", BusinessConstants.UserNotFound);
             return(View());
         }
     }
     catch (Exception ex)
     {
         ModelState.AddModelError("", BusinessConstants.contactAdmin);
         return(View());
     }
 }