public ActionResult Modifier(int id) { var deploiement = DeploiementBL.GetDeploiement(id); ViewBag.DateDeploiement = deploiement.getStandardAppDate(); ViewBag.ListeComposants = ComposantBL.GetList().Select(x => x.ToSelectListItem()); ViewBag.ListeEnvrionnements = EnvironnementBL.GetDefaultEnvironnements().Select(x => x.ToSelectListItem());; if (deploiement == null) { return(View("Error")); } else { return(View("Modifier", deploiement)); } }
public ActionResult GetComposants(string filtre, int take, int offset = 0) { IEnumerable <ComposantListeModel> composants = ComposantBL.GetList(take, offset, filtre); //System.Threading.Thread.Sleep(1000); //use to test loading spinner on new filter if (!composants.Any()) { return(Json(new { status = "All_Loaded", message = "no element left to load" })); } if (composants.Count() <= take) { composants.Last().DernierComposantAffiche = true; } return(PartialView("_Liste", composants.Take(take).ToList())); }