Ejemplo n.º 1
0
        public ActionResult Unlock(int PasgoID, int usertype)
        {
            if (Convert.ToInt32(Session["Level"]) == 1 || Session["Level"] == null)
            {
                return(RedirectToAction("Index", "Home"));
            }
            var result = db.LockUnlock(PasgoID, 1, "a", 1).ToList().ElementAt(0);

            if (Convert.ToInt32(result) == 1)
            {
                TempData["Success"] = "Mở khóa tài khoản thành công";
            }
            else
            {
                TempData["Failed"] = "Lỗi, xin thử lại!";
            }
            return(RedirectToAction("Details", "NguoiDung", new { PasgoID = PasgoID.ToString(), type = usertype }));
        }