public ActionResult DeleteConfirmed(int id) { CSP_DOC cSP_DOC = db.CSP_DOC.Find(id); db.CSP_DOC.Remove(cSP_DOC); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(CSP_DOC cSP_DOC) { if (ModelState.IsValid) { db.Entry(cSP_DOC).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CodeCSP = new SelectList(db.CSP, "Code", "Libelle", cSP_DOC.CodeCSP); ViewBag.CodeDoc = new SelectList(db.Documents, "Code", "Libelle", cSP_DOC.CodeDoc); return(View(cSP_DOC)); }
public ActionResult Create(CSP_DOC cSP_DOC) { if (ModelState.IsValid) { db.CSP_DOC.Add(cSP_DOC); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CodeCSP = new SelectList(db.CSP, "Code", "Libelle", cSP_DOC.CodeCSP); ViewBag.CodeDoc = new SelectList(db.Documents, "Code", "Libelle", cSP_DOC.CodeDoc); return(View(cSP_DOC)); }
// GET: Depouillement/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CSP_DOC cSP_DOC = db.CSP_DOC.Find(id); if (cSP_DOC == null) { return(HttpNotFound()); } return(View(cSP_DOC)); }
// GET: Depouillement/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CSP_DOC cSP_DOC = db.CSP_DOC.Find(id); if (cSP_DOC == null) { return(HttpNotFound()); } ViewBag.CodeCSP = new SelectList(db.CSP, "Code", "Libelle", cSP_DOC.CodeCSP); ViewBag.CodeDoc = new SelectList(db.Documents, "Code", "Libelle", cSP_DOC.CodeDoc); return(View(cSP_DOC)); }