Example #1
0
        public ActionResult CapNhatLopPost()
        {
            if (!HttpContext.User.Identity.IsAuthenticated)
            {
                return RedirectToAction("DanhSachLop", "Lop");
            }
            G9Service.Lop lop = new G9Service.Lop();
            lop.MaLop = Int32.Parse(HttpContext.Request["txtMaLop"]);
            lop.TenLop = HttpContext.Request["txtTenLop"];
            lop.KhoiLop = HttpContext.Request["cbKhoi"];
            lop.CaHoc = HttpContext.Request["cbCaHoc"];
            lop.SiSo = Int32.Parse(HttpContext.Request["txtSiSo"]);
            lop.GhiChu = HttpContext.Request["txtGhiChu"];

            G9Service.G9_Service ws = new G9Service.G9_Service();
            bool result = ws.CapNhatLop(lop);

            return (result == true) ? RedirectToAction("DanhSachLop", "Lop") : RedirectToAction("CapNhatLop", "Lop");
        }