public ActionResult DeleteConfirmed(int id) { DanhSachPhongChieu danhSachPhongChieu = db.DanhSachPhongChieux.Find(id); db.DanhSachPhongChieux.Remove(danhSachPhongChieu); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "PhongChieuId,TenPhongChieu,SoLuongGhe")] DanhSachPhongChieu danhSachPhongChieu) { if (ModelState.IsValid) { db.Entry(danhSachPhongChieu).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(danhSachPhongChieu)); }
public ActionResult Create([Bind(Include = "PhongChieuId,TenPhongChieu,SoLuongGhe")] DanhSachPhongChieu danhSachPhongChieu) { if (ModelState.IsValid) { db.DanhSachPhongChieux.Add(danhSachPhongChieu); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(danhSachPhongChieu)); }
// GET: DanhSachPhongChieux/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DanhSachPhongChieu danhSachPhongChieu = db.DanhSachPhongChieux.Find(id); if (danhSachPhongChieu == null) { return(HttpNotFound()); } return(View(danhSachPhongChieu)); }