public ActionResult ForgotPassword(UpdateCred UP) { List <string> OTPList = new List <string>(); OTPBEL OTPBel = new OTPBEL(); // OTPViewModel ovm = new OTPViewModel("ForgotPassword"); TempData["OTPSource"] = "ForgotPassword"; OTPList = OTPBel.GetAndSendOTP(Convert.ToInt64(UP.Mobile)); if (OTPList != null) { if (Convert.ToBoolean(OTPList[2])) { // Session[OTPList[2]+"_OTP"] = OTPList[0]; Session["OTP"] = OTPList[0]; } Session["ForgotMobleNum"] = UP.Mobile; } return(RedirectToAction("VerifyOTP", "OTP")); //return View(); }
public ActionResult ChangePassword(UpdateCred UP) { UserDetailsBEL objUserBEL = new UserDetailsBEL(); if (Session["ForgotMobleNum"] != null) { objUserBEL.Phone_No1 = Convert.ToString(Session["ForgotMobleNum"]); Session["ForgotMobleNum"] = null; objUserBEL.Password = Secure.Encrypt(UP.Password); UserDetailsDAL objUserDAL = new UserDetailsDAL(); Transaction tr = objUserDAL.UpdateCred(objUserBEL); if (tr.Success == true) { return(RedirectToAction("Login", "TrueWheelsUser")); //return RedirectToAction("Index", "UserDashbaord"); } else { ModelState.AddModelError("", tr.Success.ToString()); } } return(View("Index", "ForgotPassword")); }