| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- @model CD67.ModeleMVC.Entity.EXEMPLE_VIKINGS
- @{
- ViewBag.Title = "Create";
- Layout = "~/Views/Shared/_AppLayout.cshtml";
- }
- <h2>Creation</h2>
- @using (Html.BeginForm())
- {
- @Html.AntiForgeryToken()
- <div class="form-horizontal">
- <h4>Viking</h4>
- <hr />
- @Html.ValidationSummary(true, "", new { @class = "text-danger" })
-
- @*Contenu généré mais masqué car inutile, la clé est générée automatiquement dans mon exemple par un trigger/sequence*@
- @*<div class="form-group">
- @Html.LabelFor(model => model.ID, "ID", htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.DropDownList("ID", null, htmlAttributes: new { @class = "form-control" })
- @Html.ValidationMessageFor(model => model.ID, "", new { @class = "text-danger" })
- </div>
- </div>*@
- <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" } })
- @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*@
- <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" })
- @Html.ValidationMessageFor(model => model.ID_TYPE, "", new { @class = "text-danger" })
- </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" })
- </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" })
- </div>
- </div>
- <div class="form-group">
- <div class="col-md-offset-2 col-md-10">
- <input type="submit" value="Ajouter" class="btn btn-success" />
- <input type="reset" value="Annuler" class="btn btn-default" />
- </div>
- </div>
- </div>
- }
- <div>
- @Html.ActionLink("Retour", "Index")
- </div>
|