Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ReserveerModel reserveerModel = db.ReserveerModels.Find(id);

            db.ReserveerModels.Remove(reserveerModel);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 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));
 }
Example #3
0
        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));
        }
Example #4
0
        // 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));
        }