Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "MASV,MATKHAU,HOTENLOT,TEN,HOVATEN,NGAYSINH,GIOITINH,DIACHI,CMND,SDT,LOP,KHOA,ANH,SVNOITRU")] SINHVIEN sINHVIEN)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sINHVIEN).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(sINHVIEN));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "MAKHU,TENKHU,MOTAKHAC")] KHUNHA kHUNHA)
 {
     if (ModelState.IsValid)
     {
         db.Entry(kHUNHA).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(kHUNHA));
 }
Ejemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "MADGNUOC,DONGIANUOC")] DGNUOC dGNUOC)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dGNUOC).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dGNUOC));
 }
Ejemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "MATHANNHAN,MASV,HOTENCHA,NGHENGHIEPCHA,SDTCHA,HOTENME,NGHENGHIEPME,SDTME,THANNHANSVNT")] THANNHAN tHANNHAN)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tHANNHAN).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MASV = new SelectList(db.SINHVIENs, "MASV", "MASV", tHANNHAN.MASV);
     return(View(tHANNHAN));
 }
Ejemplo n.º 5
0
 public ActionResult Edit([Bind(Include = "MAPHONG,SOPHONG,MAKHU,SOLUONGSV,GIAPHONG,SOCHOTRONG,MOTAKHAC,TRANGTHAI")] PHONG pHONG)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pHONG).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MAKHU = new SelectList(db.KHUNHAs, "MAKHU", "TENKHU", pHONG.MAKHU);
     return(View(pHONG));
 }
Ejemplo n.º 6
0
 public ActionResult Edit([Bind(Include = "MAHOPDONG,MASV,MAPHONG,NGAYLAP,NGAYBATDAU,NGAYKETTHUC,HIEULUCHD")] HOPDONG hOPDONG)
 {
     if (ModelState.IsValid)
     {
         db.Entry(hOPDONG).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MAPHONG = new SelectList(db.PHONGs, "MAPHONG", "MAKHU", hOPDONG.MAPHONG);
     ViewBag.MASV    = new SelectList(db.SINHVIENs, "MASV", "MATKHAU", hOPDONG.MASV);
     return(View(hOPDONG));
 }
Ejemplo n.º 7
0
 public ActionResult Edit([Bind(Include = "MADIENNUOC,MAPHONG,MAQL,THANG,NAM,CHISODIEN,CHISONUOC")] DIENNUOC dIENNUOC)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dIENNUOC).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MAPHONG = new SelectList(db.PHONGs, "MAPHONG", "MAPHONG", dIENNUOC.MAPHONG);
     ViewBag.MAQL    = new SelectList(db.QUANLies, "MAQL", "MAQL", dIENNUOC.MAQL);
     return(View(dIENNUOC));
 }
Ejemplo n.º 8
0
 public ActionResult Edit([Bind(Include = "MASV,MATKHAU,HOTENLOT,TEN,HOVATEN,NGAYSINH,GIOITINH,DIACHI,CMND,SDT,LOP,KHOA,ANH,SVNOITRU")] SINHVIEN sINHVIEN)
 {
     if (ModelState.IsValid)
     {
         sINHVIEN.SVNOITRU        = true;
         sINHVIEN.MATKHAU         = sINHVIEN.MATKHAU;
         db.Entry(sINHVIEN).State = EntityState.Modified;
         db.SaveChanges();
     }
     return(RedirectToAction("Create", "THANNHANs", new { Area = "Student" }));
     //return View(sINHVIEN);
 }
 public ActionResult Edit([Bind(Include = "MAHOADON,MAPHONG,MAQL,THANG,NAM,CHISODIENCU,CHISODIENMOI,MADGDIEN,TIENDIEN,CHISONUOCCU,CHISONUOCMOI,MADGNUOC,TIENNUOC,TONGTIEN,TRANGTHAITHANHTOAN")] HDDIENNUOC hDDIENNUOC)
 {
     if (ModelState.IsValid)
     {
         db.Entry(hDDIENNUOC).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MADGDIEN = new SelectList(db.DGDIENs, "MADGDIEN", "MADGDIEN", hDDIENNUOC.MADGDIEN);
     ViewBag.MADGNUOC = new SelectList(db.DGNUOCs, "MADGNUOC", "MADGNUOC", hDDIENNUOC.MADGNUOC);
     ViewBag.MAPHONG  = new SelectList(db.PHONGs, "MAPHONG", "MAPHONG", hDDIENNUOC.MAPHONG);
     ViewBag.MAQL     = new SelectList(db.QUANLies, "MAQL", "MAQL", hDDIENNUOC.MAQL);
     return(View(hDDIENNUOC));
 }