コード例 #1
0
        public ActionResult RePassword(DLAdmin admin)
        {
            try
            {
                var email   = Request["EmailID"].ToString();
                var pass    = Request["Password"].ToString();
                var conpass = Request["ConPassword"].ToString();

                if (pass.Equals(conpass))
                {
                    if (bal.ChangePassword(email, pass))
                    {
                        return(Redirect("../Account/Login"));
                    }
                    else
                    {
                        TempData["Error"] = "Password not changed";
                        return(View());
                    }
                }
                else
                {
                    TempData["Error"] = "Password not matched";
                    return(View());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }