Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Arkivalie arkivalie = db.Arkivalie.Find(id);

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