Beispiel #1
0
        public ActionResult Block(long idKhachHang)
        {
            var tk = Session["TaiKhoan"] as KhachHang;

            if (tk == null)
            {
                return(View("../Login/Index"));
            }
            else
            {
                if (tk.LoaiTK != "Admin")
                {
                    return(View("../Home/Index"));
                }
                else
                {
                    var dao = new KhachHangDAO();
                    Session["Update"] = null;
                    dao.BlockKH(idKhachHang);
                    return(View("Index"));
                }
            }
        }