public ActionResult DeleteConfirmed(int id) { RapportMission rapportMission = db.RapportMissions.Find(id); db.RapportMissions.Remove(rapportMission); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "RapportMissionID,CommentaireMission,DateRapport")] RapportMission rapportMission) { if (ModelState.IsValid) { db.Entry(rapportMission).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RapportMissionID = new SelectList(db.Missions, "MissionID", "Commentaire", rapportMission.RapportMissionID); return(View(rapportMission)); }
// GET: RapportMissions/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RapportMission rapportMission = db.RapportMissions.Find(id); if (rapportMission == null) { return(HttpNotFound()); } return(View(rapportMission)); }
// GET: RapportMissions/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RapportMission rapportMission = db.RapportMissions.Find(id); if (rapportMission == null) { return(HttpNotFound()); } ViewBag.RapportMissionID = new SelectList(db.Missions, "MissionID", "Commentaire", rapportMission.RapportMissionID); return(View(rapportMission)); }