public ActionResult Supprimer(int id) { BlocageServiceAPI rsa = new BlocageServiceAPI(); BlocageDetails r = new BlocageDetails(rsa.Donner(id)); return(View(r)); }
public ActionResult Details(int id) { BlocageServiceAPI rsa = new BlocageServiceAPI(); Blocage r = rsa.Donner(id); BlocageDetails rd = new BlocageDetails(r); return(View(rd)); }
public static Blocage VersBlocage(this BlocageDetails e) { if (e == null) { return(null); } return(new Blocage { id = e.id, actif = e.actif, description = e.description, nom = e.nom }); }
public ActionResult Supprimer(int id, BlocageDetails r) { if (ModelState.IsValid) { BlocageServiceAPI rsa = new BlocageServiceAPI(); bool b = rsa.Supprimer(id); if (b) { return(RedirectToAction("Index")); } } return(View(r)); }