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

            return(View(account));
        }
Exemplo n.º 2
0
        /// <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));
        }
Exemplo n.º 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"));
 }
Exemplo n.º 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());
     }
 }