public ActionResult DeleteConfirmed(int id) { Sekvenser sekvenser = db.Sekvenser.Find(id); db.Sekvenser.Remove(sekvenser); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "SekvensID,SekvensNr,Journal,Titel,DateringDag,DateringMrd,DateringAar,Kilde,Interviewer,Klausul,Type,Indlevering,Note,JournalID")] Sekvenser sekvenser) { if (ModelState.IsValid) { db.Entry(sekvenser).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.JournalID = new SelectList(db.Journaler, "JournalID", "JournalNb", sekvenser.JournalID); return(View(sekvenser)); }
// GET: Sekvensers/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Sekvenser sekvenser = db.Sekvenser.Find(id); if (sekvenser == null) { return(HttpNotFound()); } return(View(sekvenser)); }
// GET: Sekvensers/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Sekvenser sekvenser = db.Sekvenser.Find(id); if (sekvenser == null) { return(HttpNotFound()); } ViewBag.JournalID = new SelectList(db.Journaler, "JournalID", "JournalNb", sekvenser.JournalID); return(View(sekvenser)); }