// GET: Account
        public ActionResult Index()
        {
            WebUserData userData = User.GetUserData();
            Account     account  = AccountBLL.Account_Get(userData.UserID);

            return(View(account));
        }
        /// <summary>
        /// Giao diện thông tin người dùng
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            HttpCookie requestCookies = Request.Cookies["userInfo"];
            string     email          = Convert.ToString(requestCookies["Email"]);
            Account    model          = AccountBLL.Account_Get(email);

            return(View(model));
        }
示例#3
0
 public ActionResult ChangeForgotPassword(string Email = "", string Password = "")
 {
     if (AccountBLL.Account_Get(Email) == null)
     {
         ModelState.AddModelError("error", "Cập nhật không thành công");
         return(RedirectToAction("ChangePwd"));
     }
     if (UserAccountBLL.Account_ChangePwd(Password, Email))
     {
         return(RedirectToAction("Index"));
     }
     return(RedirectToAction("Index"));
 }
示例#4
0
 public ActionResult ForgotPassword(string Email = "")
 {
     if (string.IsNullOrEmpty(Email))
     {
         ModelState.AddModelError("Email", "Email is required");
     }
     try
     {
         if (AccountBLL.Account_Get(Email) != null)
         {
             string code = "1997";
             return(Redirect("/Account/ChangeForgotPassword?email=" + Email + "&code=" + code.GetHashCode()));
         }
         ModelState.AddModelError("Email", "Email is not exist");
         return(View());
     }
     catch (Exception e)
     {
         ModelState.AddModelError("Email", "Email is not exist");
         return(View());
     }
 }