public ActionResult Supprimer(int id) { AbonnementServiceAPI rsa = new AbonnementServiceAPI(); AbonnementDetails r = new AbonnementDetails(rsa.Donner(id)); return(View(r)); }
public ActionResult Details(int id) { AbonnementServiceAPI rsa = new AbonnementServiceAPI(); /*!!??!!! pourquoi a est-il vide? à cause de decimal?)*/ Abonnement a = rsa.Donner(id); AbonnementDetails ad = new AbonnementDetails(a); return(View(ad)); }
public ActionResult Supprimer(int id, AbonnementDetails r) { if (ModelState.IsValid) { AbonnementServiceAPI rsa = new AbonnementServiceAPI(); bool b = rsa.Supprimer(id); if (b) { return(RedirectToAction("Index")); } } return(View(r)); }