public ActionResult Details(int id, int idEnvironnement = 0) { var composant = ComposantBL.GetComposant(id); if (composant == null) { return(View("Error")); } else { composant.EnvironnementSelectionne = idEnvironnement; return(View("Details", composant)); } }
public ActionResult Modifier(int id, int idEnvironnement) { var composant = ComposantBL.GetComposant(id); if (composant == null) { return(View("Error")); } else { composant.EnvironnementSelectionne = idEnvironnement; ViewBag.ListeTypes = TypeBL.GetAllTypes().Select(x => x.ToSelectListItem()); ViewBag.ListeClients = ClientBL.GetAllClients().Select(x => x.ToSelectListItem()); ViewBag.ListeResponsables = ResponsableBL.GetAllResponsables().Select(x => x.ToSelectListItem()); ViewBag.ListeTechnologies = TechnologieBL.GetAllTechnologies().Select(x => x.ToSelectListItem()); return(View("Modifier", composant)); } }