public ActionResult Supprimer(int id) { RoleServiceAPI rsa = new RoleServiceAPI(); RoleSuppression r = new RoleSuppression(rsa.Donner(id)); return(View(r)); }
public ActionResult Index() { RoleServiceAPI rs = new RoleServiceAPI(); IEnumerable <RoleIndex> ri = rs.Donner().Select(j => new RoleIndex(j)); return(View(ri)); }
public ActionResult Details(int id) { RoleServiceAPI rsa = new RoleServiceAPI(); Role r = rsa.Donner(id); RoleDetails rd = new RoleDetails(r); return(View(rd)); }
public ActionResult Modifier(int id) { RoleServiceAPI rs = new RoleServiceAPI(); RoleModification r = new RoleModification(rs.Donner(id)); return(View(r)); }
public ActionResult Supprimer(int id, RoleSuppression r) { RoleServiceAPI rsa = new RoleServiceAPI(); RoleSuppression rr = new RoleSuppression(rsa.Donner(id)); if (ModelState.IsValid) { //RoleServiceAPI rsa = new RoleServiceAPI(); bool b = rsa.Supprimer(id); if (b) { return(RedirectToAction("Index")); } } return(View("Error")); }