public ActionResult Modifier(int id) { BlocageServiceAPI rs = new BlocageServiceAPI(); BlocageModification r = new BlocageModification(rs.Donner(id)); return(View(r)); }
public static Blocage VersBlocage(this BlocageModification e) { if (e == null) { return(null); } return(new Blocage { id = e.id, description = e.description, nom = e.nom }); }
public ActionResult Modifier(int id, BlocageModification rm) { if (ModelState.IsValid) { BlocageServiceAPI rsa = new BlocageServiceAPI(); Blocage r = rm.VersBlocage(); bool b = rsa.Modifier(id, r); if (b) { return(RedirectToAction("Index")); } } return(View(rm)); }