Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "MaLoaiKhach,TenLoaiKhach")] LoaiKhach loaiKhach)
 {
     if (ModelState.IsValid)
     {
         db.Entry(loaiKhach).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(loaiKhach));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "MaPhong,MaLoaiPhong,TinhTrang,GhiChu")] Phong phong)
 {
     if (ModelState.IsValid)
     {
         db.Entry(phong).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaLoaiPhong = new SelectList(db.LoaiPhongs, "MaLoaiPhong", "MaLoaiPhong", phong.MaLoaiPhong);
     return(View(phong));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "SoHD,Ngay,MaKH")] HoaDon hoaDon)
 {
     if (ModelState.IsValid)
     {
         db.Entry(hoaDon).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaKH = new SelectList(db.KhachHangs, "MaKH", "MaKH", hoaDon.MaKH);
     return(View(hoaDon));
 }
Exemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "MaKH,MaLoaiKhach,TenKhach,GioiTinh,CMND,DiaChi")] KhachHang khachHang)
 {
     if (ModelState.IsValid)
     {
         db.Entry(khachHang).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaLoaiKhach = new SelectList(db.LoaiKhaches, "MaLoaiKhach", "MaLoaiKhach", khachHang.MaLoaiKhach);
     return(View(khachHang));
 }
Exemplo n.º 5
0
 public ActionResult Edit([Bind(Include = "MaThue,SoHD,MaPhong,NgayDen,NgayDi,SoLuong")] PhongThue phongThue)
 {
     if (ModelState.IsValid)
     {
         db.Entry(phongThue).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaPhong = new SelectList(db.Phongs, "MaPhong", "MaPhong", phongThue.MaPhong);
     return(View(phongThue));
 }
Exemplo n.º 6
0
 public ActionResult Edit([Bind(Include = "STT,MaThue,HoTen,CMND,MaKH")] ChiTietThue chiTietThue)
 {
     if (ModelState.IsValid)
     {
         db.Entry(chiTietThue).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaKH   = new SelectList(db.KhachHangs, "MaKH", "MaLoaiKhach", chiTietThue.MaKH);
     ViewBag.MaThue = new SelectList(db.PhongThues, "MaThue", "MaThue", chiTietThue.MaThue);
     return(View(chiTietThue));
 }
Exemplo n.º 7
0
 public ActionResult Edit([Bind(Include = "IDCTHD,SoHD,MaThue,SoNgayO,Tien")] ChiTietHD chiTietHD)
 {
     if (ModelState.IsValid)
     {
         db.Entry(chiTietHD).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.SoHD   = new SelectList(db.HoaDons, "SoHD", "SoHD", chiTietHD.SoHD);
     ViewBag.MaThue = new SelectList(db.PhongThues, "MaThue", "MaThue", chiTietHD.MaThue);
     return(View(chiTietHD));
 }