Пример #1
0
        public ActionResult CapNhatPhong()
        {
            if (!HttpContext.User.Identity.IsAuthenticated)
            {
                return RedirectToAction("DanhSachPhong", "Phong");
            }
            if (HttpContext.Request["id"] == null || HttpContext.Request["id"].Equals(""))
                return RedirectToAction("DanhSachPhong", "Phong");

            int id = Int32.Parse(HttpContext.Request["id"]);
            G9Service.G9_Service ws = new G9Service.G9_Service();
            G9Service.Phong gv = ws.GetPhong(id);

            ViewData["MaPhong"] = id;
            ViewData["TenPhong"] = gv.TenPhong;

            ViewData["TinhTrang"] = gv.TinhTrang;
            ViewData["SucChua"] = gv.SucChua;

            return View();
        }