@using CD67.FicheCollege.MVC.Models @model TopModel @{ ViewBag.Title = "Ajout"; Layout = "~/Views/Shared/_Layout.cshtml"; College college = (Model.Obj as College); }

@college.Libelle

@using (Html.BeginForm()) { @Html.AntiForgeryToken()
Informations générales - @Model.Acces.ToString()

Collège


@Html.ValidationSummary(true, "", new { @class = "text-danger" }) @if (Model.Acces == ModeAcces.Modification) { @Html.HiddenFor(model => college.Id) }
@Html.LabelFor(model => college.CodeRne, htmlAttributes: new { @class = "control-label col-md-2" })
@if (Model.Acces == ModeAcces.Modification) { @Html.EditorFor(model => college.CodeRne, new { htmlAttributes = new { @class = "form-control", @disabled = true } }) } else { @Html.EditorFor(model => college.CodeRne, new { htmlAttributes = new { @class = "form-control" } }) } @Html.ValidationMessageFor(model => college.CodeRne, "", new { @class = "text-danger" })
@Html.LabelFor(model => college.Libelle, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => college.Libelle, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => college.Libelle, "", new { @class = "text-danger" })
@Html.LabelFor(model => college.TypeCollege_Id, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.DropDownListFor(model => college.TypeCollege_Id, (Model.Bag["Select_TypeCollege"] as IEnumerable), htmlAttributes: new { @class = "form-control" }) @Html.ValidationMessageFor(model => college.TypeCollege_Id, "", new { @class = "text-danger" })
@Html.LabelFor(model => college.Adresse, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => college.Adresse, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => college.Adresse, "", new { @class = "text-danger" })
@Html.HiddenFor(model => college.Commune_Insee, new { data_picker = "commune.insee" }) @Html.HiddenFor(model => college.Commune, new { data_picker = "commune.nom" }) @Html.HiddenFor(model => college.Canton, new { data_picker = "commune.canton" }) @Html.HiddenFor(model => college.Territoire_Id, new { data_picker = "commune.code_tad" }) @Html.HiddenFor(model => college.TAD, new { data_picker = "commune.tad" }) @Html.HiddenFor(model => college.CDC, new { data_picker = "commune.cdc" })
@Html.LabelFor(model => college.Commune, htmlAttributes: new { @class = "control-label col-md-2 required" })
Sélectionner une commune

Localisation (commune)

@college.Commune
Canton : @college.Canton
TAD : @college.TAD
CDC : @college.CDC
@Html.ValidationMessageFor(model => college.Commune, "", new { @class = "text-danger" })
@Html.LabelFor(model => college.Code_Postal, htmlAttributes: new { @class = "control-label col-md-2" })
Code(s) postal(aux) associé(s) à la commune ).Count() == 1) { display: none; }">(attention, plusieurs choix possibles) : ).Select(i => i.Text))" class="disabled-input-as-label" />
@Html.DropDownListFor(model => college.Code_Postal, (Model.Bag["Select_CodePostaux"] as IEnumerable), htmlAttributes: new { @class = "form-control" }) @Html.ValidationMessageFor(model => college.Code_Postal, "", new { @class = "text-danger" })
@Html.LabelFor(model => college.Tel, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => college.Tel, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => college.Tel, "", new { @class = "text-danger" })
@Html.LabelFor(model => college.Fax, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => college.Fax, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => college.Fax, "", new { @class = "text-danger" })
@Html.LabelFor(model => college.Email, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => college.Email, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => college.Email, "", new { @class = "text-danger" })
| @if (Model.Acces == ModeAcces.Creation) { @Html.ActionLink("Annuler", "Index") } else { @Html.ActionLink("Annuler", "Details", new { Id = college.Id }) }
} @section Scripts { @Scripts.Render("~/bundles/jqueryval") }