Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Kabelchecklist kabelchecklist = db.Kabelchecklists.Find(id);

            db.Kabelchecklists.Remove(kabelchecklist);
            db.SaveChanges();
            return(RedirectToAction("Details", "Opdracht", new { id }));
        }
Пример #2
0
        public ActionResult Create([Bind(Include = "KabelID,Breuk6D,Breuk30D,BeschadigingBuitenzijde,BeschadigingRoestCorrosie,VerminderdeKabeldiameter,PositieMeetpunten,BeschadigingTotaal,TypeBeschadigingEnVervormingen,Opdrachtnummer")] Kabelchecklist kabelchecklist)
        {
            if (ModelState.IsValid)
            {
                db.Kabelchecklists.Add(kabelchecklist);
                db.SaveChanges();
            }

            return(RedirectToAction("Details", "Opdracht", new { id = kabelchecklist.Opdrachtnummer }));
        }
Пример #3
0
 public ActionResult Edit([Bind(Include = "KabelID,Breuk6D,Breuk30D,BeschadigingBuitenzijde,BeschadigingRoestCorrosie,VerminderdeKabeldiameter,PositieMeetpunten,BeschadigingTotaal,TypeBeschadigingEnVervormingen,Opdrachtnummer")] Kabelchecklist kabelchecklist)
 {
     if (ModelState.IsValid)
     {
         db.Entry(kabelchecklist).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Opdrachtnummer = new SelectList(db.Opdrachten, "OpdrachtNummer", "WerkInstructie", kabelchecklist.Opdrachtnummer);
     return(View(kabelchecklist));
 }
Пример #4
0
        // GET: Kabelchecklist/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Kabelchecklist kabelchecklist = db.Kabelchecklists.Find(id);

            if (kabelchecklist == null)
            {
                return(HttpNotFound());
            }
            return(View(kabelchecklist));
        }
Пример #5
0
        // GET: Kabelchecklist/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Kabelchecklist kabelchecklist = db.Kabelchecklists.Find(id);

            if (kabelchecklist == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Opdrachtnummer = new SelectList(db.Opdrachten, "OpdrachtNummer", "OpdrachtNummer", kabelchecklist.Opdrachtnummer);
            return(View(kabelchecklist));
        }