public ActionResult DeleteConfirmed(int id) { Biografbillet biografbillet = db.Biografbillet.Find(id); db.Biografbillet.Remove(biografbillet); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "filmnavn,dato,tid,sæderække,stolenummer,kundeNr,id")] Biografbillet biografbillet) { if (ModelState.IsValid) { db.Entry(biografbillet).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.kundeNr = new SelectList(db.Kunde, "tlfNr", "navn", biografbillet.kundeNr); return(View(biografbillet)); }
public ActionResult Create([Bind(Include = "filmnavn,dato,tid,sæderække,stolenummer,kundeNr,id")] Biografbillet biografbillet) { if (ModelState.IsValid) { db.Biografbillet.Add(biografbillet); db.SaveChanges(); return(RedirectToAction("Index", new { phone = biografbillet.kundeNr })); } ViewBag.kundeNr = new SelectList(db.Kunde, "tlfNr", "navn", biografbillet.kundeNr); return(View(biografbillet)); }
// GET: Biografbillets/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Biografbillet biografbillet = db.Biografbillet.Find(id); if (biografbillet == null) { return(HttpNotFound()); } return(View(biografbillet)); }
// GET: Biografbillets/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Biografbillet biografbillet = db.Biografbillet.Find(id); if (biografbillet == null) { return(HttpNotFound()); } ViewBag.kundeNr = new SelectList(db.Kunde, "tlfNr", "navn", biografbillet.kundeNr); return(View(biografbillet)); }