public ActionResult DeleteConfirmed(int id) { Arkivalie arkivalie = db.Arkivalie.Find(id); db.Arkivalie.Remove(arkivalie); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ArkivalieID,Journal,Arkivfondnr,Art,KasseNr,Signatur,Klausul,YderAarStart,YderAarSlut,Omfang,AntKort,Indlevering,Note,JournalID,ArkivfondID")] Arkivalie arkivalie) { if (ModelState.IsValid) { db.Entry(arkivalie).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ArkivfondID = new SelectList(db.ArkivFond, "ArkivfondID", "ArkivNr", arkivalie.ArkivfondID); ViewBag.JournalID = new SelectList(db.Journaler, "JournalID", "JournalNb", arkivalie.JournalID); return(View(arkivalie)); }
// GET: Arkivalies/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Arkivalie arkivalie = db.Arkivalie.Find(id); if (arkivalie == null) { return(HttpNotFound()); } return(View(arkivalie)); }
// GET: Arkivalies/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Arkivalie arkivalie = db.Arkivalie.Find(id); if (arkivalie == null) { return(HttpNotFound()); } ViewBag.ArkivfondID = new SelectList(db.ArkivFond, "ArkivfondID", "ArkivNr", arkivalie.ArkivfondID); ViewBag.JournalID = new SelectList(db.Journaler, "JournalID", "JournalNb", arkivalie.JournalID); return(View(arkivalie)); }