public ActionResult Edit([Bind(Include = "IDPhieuDat,Username,NgayDat,TinhTrangThanhToan,HoTen,SoDienThoai,Mail,YeuCauKhac,TinhTrangXuLy")] DatPhong datPhong) { if (ModelState.IsValid) { db.Entry(datPhong).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(datPhong)); }
public ActionResult Edit([Bind(Include = "ID,TenPhong,DienTich,ToiDa,DichVuHuyPhong,GiaTien,GomBuaAn,Img,MoTa,KhachSan_ID")] PhongKhachSan phongKhachSan) { if (ModelState.IsValid) { db.Entry(phongKhachSan).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(phongKhachSan)); }
public ActionResult Edit([Bind(Include = "ID,Content")] Footer footer) { if (ModelState.IsValid) { db.Entry(footer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(footer)); }
public ActionResult Edit([Bind(Include = "Username,Password,HoTen")] User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(user)); }
public ActionResult Edit([Bind(Include = "ID,TenThanhPho")] ThanhPho thanhPho) { if (ModelState.IsValid) { db.Entry(thanhPho).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(thanhPho)); }
public ActionResult Edit([Bind(Include = "ID,Img,Description")] Slide slide) { if (ModelState.IsValid) { db.Entry(slide).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(slide)); }
public ActionResult Edit([Bind(Include = "ID,TenKhachSan,UnsignedName,DiaChi,XepHang,SoDienThoai,ThongTinLienHe,GiaTien,UuTien,ThongTinMoTa,TienIch,ChinhSach,QuanHuyen_ID,GoogleMap")] KhachSan khachSan) { if (ModelState.IsValid) { db.Entry(khachSan).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.QuanHuyen_ID = new SelectList(db.QuanHuyens, "ID", "TenQuanHuyen", khachSan.QuanHuyen_ID); return(View(khachSan)); }
public ActionResult Edit([Bind(Include = "ID,TenQuanHuyen,ThanhPho_ID")] QuanHuyen quanHuyen) { if (ModelState.IsValid) { db.Entry(quanHuyen).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ThanhPho_ID = new SelectList(db.ThanhPhoes, "ID", "TenThanhPho", quanHuyen.ThanhPho_ID); return(View(quanHuyen)); }
public ActionResult Edit([Bind(Include = "ID,TenBaiViet,TenBaiVietUnsigned,NgayDang,NoiDung")] BaiViet baiViet) { baiViet.NgayDang = DateTime.Now; baiViet.TenBaiVietUnsigned = StringConverter.toUnsignedString(baiViet.TenBaiViet); if (ModelState.IsValid) { db.Entry(baiViet).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(baiViet)); }