| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- @model CD67.ModeleMVC.Entity.EXEMPLE_VIKINGS
- @{
- ViewBag.Title = "Edit";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- <title>Vikings</title>
- <h2>Edition</h2>
- @using (Html.BeginForm())
- {
- @Html.AntiForgeryToken()
- <div class="form-horizontal">
- <h4>Viking</h4>
- <hr />
- @Html.ValidationSummary(true, "", new { @class = "text-danger" })
- @Html.HiddenFor(model => model.ID)
- <div class="form-group">
- @Html.LabelFor(model => model.NOM, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.NOM, new { htmlAttributes = new { @class = "form-control autofocus" } })
- @Html.ValidationMessageFor(model => model.NOM, "", new { @class = "text-danger" })
- </div>
- </div>
- @*Liste de choix pour le type, rempli gràce au ViewBag dans le contrôleur*@
- @*Liste principale pour la liste imbriquée sous-type*@
- <div class="form-group">
- @Html.LabelFor(model => model.ID_TYPE, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.DropDownList("ID_TYPE", null, htmlAttributes: new { @class = "form-control liste-principale", @data = "/VIKINGS/listeSousType" })
- @Html.ValidationMessageFor(model => model.ID_TYPE, "", new { @class = "text-danger" })
- </div>
- </div>
- @*Liste de choix d'un sous-type fictif*@
- <div class="form-group">
- @Html.LabelFor(model => model.ID_SOUS_TYPE, "Sous type", htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.DropDownList("ID_SOUS_TYPE", null, htmlAttributes: new { @class = "form-control liste-secondaire" })
- @Html.ValidationMessageFor(model => model.ID_SOUS_TYPE, "", new { @class = "text-danger" })
- @Html.DescriptionFor(model => model.ID_SOUS_TYPE)
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.DESCRIPTION, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.DESCRIPTION, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.DESCRIPTION, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.alwaysYes, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.alwaysYes, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.alwaysYes, "", new { @class = "text-danger" })
- @Html.DescriptionFor(model => model.alwaysYes)
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.alwaysNo, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.alwaysNo, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.alwaysNo, "", new { @class = "text-danger" })
- @Html.DescriptionFor(model => model.alwaysNo)
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.DATE_INUTILE, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.DATE_INUTILE, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.DATE_INUTILE, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- <div class="col-md-offset-2 col-md-10">
- <input type="submit" value="Enregistrer" class="btn btn-primary" />
- <input type="reset" value="Annuler" class="btn btn-default" />
- </div>
- </div>
- </div>
- }
- <div>
- @*Message d'alerte au retour sur la page précédente*@
- <a href="#" onclick="Annulation('@Url.Action("Index")')">Retour</a>
- </div>
|