Ejemplo n.º 1
0
        public ActionResult CapNhatPhongPost()
        {
            if (!HttpContext.User.Identity.IsAuthenticated)
            {
                return RedirectToAction("DanhSachPhong", "Phong");
            }
            G9Service.Phong gv = new G9Service.Phong();
            gv.MaPhong = Int32.Parse(HttpContext.Request["txtMaPhong"]);
            gv.TenPhong = HttpContext.Request["txtTenPhong"];
            gv.TinhTrang = HttpContext.Request["txtTinhTrang"];
            gv.SucChua = Int32.Parse(HttpContext.Request["txtSucChua"]);

            G9Service.G9_Service ws = new G9Service.G9_Service();
            bool result = ws.CapNhatPhong(gv);

            return (result == true) ? RedirectToAction("DanhSachPhong", "Phong") : RedirectToAction("CapNhatPhong", "Phong");
        }