public ActionResult Edit([Bind(Include = "MaDoiTuong,TenDoiTuong,TiLeGiamHocPhi")] DOITUONG dOITUONG)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dOITUONG).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dOITUONG));
 }
 public ActionResult Edit([Bind(Include = "MaTinh,TenTinh")] TINH tINH)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tINH).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tINH));
 }
예제 #3
0
 public ActionResult Edit([Bind(Include = "MaKhoa,TenKhoa")] KHOA kHOA)
 {
     if (ModelState.IsValid)
     {
         db.Entry(kHOA).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(kHOA));
 }
 public ActionResult Edit([Bind(Include = "MaLoaiMon,TenLoaiMon,SoTietTC,SoTienTC")] LOAIMON lOAIMON)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lOAIMON).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(lOAIMON));
 }
예제 #5
0
 public ActionResult Edit([Bind(Include = "MaHKNH,HocKy,Nam1,Nam2,HanDongHocPhi")] HKNH hKNH)
 {
     if (ModelState.IsValid)
     {
         db.Entry(hKNH).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(hKNH));
 }
 public ActionResult Edit([Bind(Include = "MaNganh,MaKhoa,TenNganh")] NGANH nGANH)
 {
     if (ModelState.IsValid)
     {
         db.Entry(nGANH).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaKhoa = new SelectList(db.KHOAs, "MaKhoa", "TenKhoa", nGANH.MaKhoa);
     return(View(nGANH));
 }
 public ActionResult Edit([Bind(Include = "TenDangNhap,MatKhau,IDNhomNguoiDung")] NGUOIDUNG nGUOIDUNG)
 {
     if (ModelState.IsValid)
     {
         db.Entry(nGUOIDUNG).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.IDNhomNguoiDung = new SelectList(db.NHOMNGUOIDUNGs, "IDNhomNguoiDung", "TenNhomNguoiDung", nGUOIDUNG.IDNhomNguoiDung);
     return(View(nGUOIDUNG));
 }
 public ActionResult Edit([Bind(Include = "MaHuyen,TenHuyen,MaTinh,UuTien")] HUYEN hUYEN)
 {
     if (ModelState.IsValid)
     {
         db.Entry(hUYEN).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaTinh = new SelectList(db.TINHs, "MaTinh", "TenTinh", hUYEN.MaTinh);
     return(View(hUYEN));
 }
 public ActionResult Edit([Bind(Include = "MaMonHoc,TenMonHoc,MaLoaiMon,SoTiet")] MONHOC mONHOC)
 {
     if (ModelState.IsValid)
     {
         db.Entry(mONHOC).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaLoaiMon = new SelectList(db.LOAIMONs, "MaLoaiMon", "TenLoaiMon", mONHOC.MaLoaiMon);
     return(View(mONHOC));
 }
 public ActionResult Edit([Bind(Include = "MaMo,MaHKNH,MaMonHoc")] DS_MONHOC_MO dS_MONHOC_MO)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dS_MONHOC_MO).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaHKNH   = new SelectList(db.HKNHs, "MaHKNH", "HocKy", dS_MONHOC_MO.MaHKNH);
     ViewBag.MaMonHoc = new SelectList(db.MONHOCs, "MaMonHoc", "TenMonHoc", dS_MONHOC_MO.MaMonHoc);
     return(View(dS_MONHOC_MO));
 }
 public ActionResult Edit([Bind(Include = "MaHKNH,MaSinhVien,SoTienConLai")] BAOCAO_SV_NOHP bAOCAO_SV_NOHP)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bAOCAO_SV_NOHP).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaSinhVien = new SelectList(db.HKNHs, "MaHKNH", "HocKy", bAOCAO_SV_NOHP.MaSinhVien);
     ViewBag.MaSinhVien = new SelectList(db.SINHVIENs, "MaSinhVien", "HoTen", bAOCAO_SV_NOHP.MaSinhVien);
     return(View(bAOCAO_SV_NOHP));
 }
 public ActionResult Edit([Bind(Include = "SoPhieuDK,MaMo,GhiChu")] CT_PHIEUDK cT_PHIEUDK)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cT_PHIEUDK).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaMo      = new SelectList(db.DS_MONHOC_MO, "MaMo", "MaHKNH", cT_PHIEUDK.MaMo);
     ViewBag.SoPhieuDK = new SelectList(db.PHIEU_DK, "SoPhieuDK", "MaSinhVien", cT_PHIEUDK.SoPhieuDK);
     return(View(cT_PHIEUDK));
 }
예제 #13
0
 public ActionResult Edit([Bind(Include = "MaSinhVien,HoTen,GioiTinh,NgaySinh,MaHuyen,MaDoiTuong,MaNganh")] SINHVIEN sINHVIEN)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sINHVIEN).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("HomeSinhVien", "SinhVien", new { TenDangNhap = sINHVIEN.MaSinhVien }));
     }
     ViewBag.MaDoiTuong = new SelectList(db.DOITUONGs, "MaDoiTuong", "TenDoiTuong", sINHVIEN.MaDoiTuong);
     ViewBag.MaHuyen    = new SelectList(db.HUYENs, "MaHuyen", "TenHuyen", sINHVIEN.MaHuyen);
     ViewBag.MaNganh    = new SelectList(db.NGANHs, "MaNganh", "MaKhoa", sINHVIEN.MaNganh);
     return(RedirectToAction("HomeSinhVien", new { area = "SinhVien", TenDangNhap = sINHVIEN.MaSinhVien }));
 }
예제 #14
0
 public ActionResult Edit([Bind(Include = "SoPhieuThu,SoPhieuDK,NgayLap,SoTienThu")] PHIEUTHU pHIEUTHU)
 {
     try
     {
         if (ModelState.IsValid)
         {
             db.Entry(pHIEUTHU).State = EntityState.Modified;
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
         ViewBag.SoPhieuDK = new SelectList(db.PHIEU_DK, "SoPhieuDK", "SoPhieuDK", pHIEUTHU.SoPhieuDK);
         return(View(pHIEUTHU));
     }
     catch (Exception e)
     {
         return(RedirectToAction("Edit", "PHIEUTHUs", new { id = pHIEUTHU.SoPhieuThu, ed = 1 }));
     }
 }
예제 #15
0
 public ActionResult Edit([Bind(Include = "MaNganh,MaMonHoc,HocKy")] CT_NGANH cT_NGANH)
 {
     try
     {
         if (ModelState.IsValid)
         {
             db.Entry(cT_NGANH).State = EntityState.Modified;
             db.SaveChanges();
             return(RedirectToAction("Index", "CT_NGANH", new { id = cT_NGANH.MaNganh }));
         }
         ViewBag.MaMonHoc = new SelectList(db.MONHOCs, "MaMonHoc", "TenMonHoc", cT_NGANH.MaMonHoc);
         ViewBag.MaNganh  = new SelectList(db.NGANHs, "MaNganh", "MaKhoa", cT_NGANH.MaNganh);
         //return RedirectToAction("Index", new { id = cT_NGANH.MaNganh });
         return(RedirectToAction("Index", "CT_NGANH", new { id = cT_NGANH.MaNganh }));
     }
     catch (Exception e)
     {
         return(RedirectToAction("Edit", "CT_NGANH", new { MaNganh = cT_NGANH.MaNganh, MaMonHoc = cT_NGANH.MaMonHoc, ed = 1 }));
     }
 }
예제 #16
0
 public ActionResult Edit([Bind(Include = "MaSinhVien,HoTen,GioiTinh,NgaySinh,MaHuyen,MaDoiTuong,MaNganh")] SINHVIEN sINHVIEN)
 {
     try
     {
         if (ModelState.IsValid)
         {
             db.Entry(sINHVIEN).State = EntityState.Modified;
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
         ViewBag.MaDoiTuong = new SelectList(db.DOITUONGs, "MaDoiTuong", "TenDoiTuong", sINHVIEN.MaDoiTuong);
         ViewBag.MaHuyen    = new SelectList(db.HUYENs, "MaHuyen", "TenHuyen", sINHVIEN.MaHuyen);
         ViewBag.MaTinh     = new SelectList(db.TINHs, "MaTinh", "TenTinh", sINHVIEN.MaTinh);
         ViewBag.MaNganh    = new SelectList(db.NGANHs, "MaNganh", "TenNganh", sINHVIEN.MaNganh);
         return(View(sINHVIEN));
     }
     catch (Exception e)
     {
         return(RedirectToAction("Edit", "SINHVIENs", new { id = sINHVIEN.MaSinhVien, ed = 1 }));
     }
 }