コード例 #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));
        }