public ActionResult DeleteConfirmed(int id) { Kabelchecklist kabelchecklist = db.Kabelchecklists.Find(id); db.Kabelchecklists.Remove(kabelchecklist); db.SaveChanges(); return(RedirectToAction("Details", "Opdracht", new { id })); }
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 })); }
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)); }
// 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)); }
// 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)); }