public ViewResult RecevoirDescriptionZoo(ModeleApplicationZoo application, FormCollection posted) { ViewBag.info = string.Format("Contrôleur={0}, Action={1}", RouteData.Values["controller"], RouteData.Values["action"]); ModeleVueZoo modèle = new ModeleVueZoo(application); TryUpdateModel(modèle, posted); // traitement des valeurs non postées if (posted["CheckBoxesFieldOrigine"] == null) { modèle.CheckBoxesFieldOrigine = new string[] { }; } if (posted["DropDownListFieldTypeAnimal"] == null) { // modèle.SimpleChoiceListFieldType = ""; modèle.DropDownListFieldTypeAnimal = ""; } if (posted["MultipleChoiceListField"] == null) { modèle.MultipleChoiceListField = new string[] { }; } // affichage formulaire return(View("FormulaireZoo", modèle)); }
public ViewResult DecrireZoo(ModeleApplicationZoo application) { ViewBag.info = string.Format("Contrôleur={0}, Action={1}", RouteData.Values["controller"], RouteData.Values["action"]); return(View("FormulaireZoo", new ModeleVueZoo(application))); }