예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Sekvenser sekvenser = db.Sekvenser.Find(id);

            db.Sekvenser.Remove(sekvenser);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 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));
 }
예제 #3
0
        // 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));
        }
예제 #4
0
        // 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));
        }