예제 #1
0
        public ActionResult ResetPassword(HelpDeskEntities.Account.ResetPassword cp)
        {
            var msg = "";

            if (GenericClass.VerifyOTP(Session["otp"], cp.otp, out msg))
            {
                var flag = AccBAL.ResetPassword(cp, out msg);
                if (flag)
                {
                    Session["otp"]      = null;
                    TempData["succMsg"] = msg;
                    return(RedirectToAction("login"));
                }
                else
                {
                    TempData["errMsg"] = msg;
                    cp.otp             = "";
                    return(View(cp));
                }
            }
            else
            {
                cp.otp             = "";
                TempData["errMsg"] = msg;
                return(View(cp));
            }
        }
예제 #2
0
        public ActionResult ResetPassword(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest, "User Id not passed in request"));
            }
            var u = uBAL.GetUserByUID(Convert.ToInt32(id));

            HelpDeskEntities.Account.ResetPassword cp = new HelpDeskEntities.Account.ResetPassword()
            {
                UserEmail = u.EmailID
            };
            return(View(cp));
        }