public ActionResult DeleteConfirmed(int id) { TableJalon tableJalon = db.TableJalon.Find(id); db.TableJalon.Remove(tableJalon); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(TableJalon tableJalon) { if (ModelState.IsValid) { db.Entry(tableJalon).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index", new { id = tableJalon.IdProjet })); } ViewBag.IdProjet = new SelectList(db.TableProjet, "ProjetId", "ProjetNom", tableJalon.IdProjet); ViewBag.JalonTrigramme = new SelectList(db.TableTrigramme, "TrigrammeId", "TrigrammeNom", tableJalon.JalonTrigramme); return(View(tableJalon)); }
public ActionResult Create(TableJalon tableJalon) { if (ModelState.IsValid) { db.TableJalon.Add(tableJalon); db.SaveChanges(); return(RedirectToAction("Index", new { id = tableJalon.IdProjet })); } ViewBag.IdProjet = new SelectList(db.TableProjet, "ProjetId", "ProjetNom", tableJalon.IdProjet); // ViewBag.IdJalon = new SelectList(db.TableTache, "TacheId", "TacheNom", tableJalon.Id); ViewBag.JalonTrigramme = new SelectList(db.TableTrigramme, "TrigrammeId", "TrigrammeNom", tableJalon.JalonTrigramme); return(View(tableJalon)); }
// GET: TableJalons/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TableJalon tableJalon = db.TableJalon.Find(id); if (tableJalon == null) { return(HttpNotFound()); } return(View(tableJalon)); }
// GET: TableJalons/Edit/5 public ActionResult Edit(int?id, int?idpage) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TableJalon tableJalon = db.TableJalon.Find(id); ViewBag.IdProjet = id; if (tableJalon == null) { return(HttpNotFound()); } ViewBag.IdProjet = new SelectList(db.TableProjet, "ProjetId", "ProjetNom", tableJalon.IdProjet); ViewBag.JalonTrigramme = new SelectList(db.TableTrigramme, "TrigrammeId", "TrigrammeNom", tableJalon.JalonTrigramme); return(View(tableJalon)); }