public ActionResult DeleteConfirmed(int id) { ReserveerModel reserveerModel = db.ReserveerModels.Find(id); db.ReserveerModels.Remove(reserveerModel); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "RevereringID,Menu,Personen,Tijd")] ReserveerModel reserveerModel) { if (ModelState.IsValid) { db.Entry(reserveerModel).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(reserveerModel)); }
public ActionResult Create([Bind(Include = "RevereringID,Menu,Personen,Tijd")] ReserveerModel reserveerModel) { if (ModelState.IsValid) { db.ReserveerModels.Add(reserveerModel); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(reserveerModel)); }
// GET: Reserveer/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ReserveerModel reserveerModel = db.ReserveerModels.Find(id); if (reserveerModel == null) { return(HttpNotFound()); } return(View(reserveerModel)); }