Create.cshtml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. @using CD67.FicheCollege.MVC.Models
  2. @model ActionEduViewModel
  3. @{
  4. ViewBag.Title = "Création";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. ActionEdu actionEdu = Model.Obj;
  7. }
  8. @using (Html.BeginForm())
  9. {
  10. @Html.AntiForgeryToken()
  11. <div class="form-horizontal">
  12. <h4>Actions</h4>
  13. <hr />
  14. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  15. @Html.HiddenFor(model => actionEdu.Id)
  16. @Html.HiddenFor(model => actionEdu.Ordre)
  17. @Html.HiddenFor(model => actionEdu.AnneeId)
  18. <div class="form-group">
  19. @Html.LabelFor(model => actionEdu.Numero, htmlAttributes: new { @class = "control-label col-md-2" })
  20. <div class="col-md-10">
  21. @Html.EditorFor(model => actionEdu.Numero, new { htmlAttributes = new { @class = "form-control" } })
  22. @Html.ValidationMessageFor(model => actionEdu.Numero, "", new { @class = "text-danger" })
  23. </div>
  24. </div>
  25. <div class="form-group">
  26. @Html.LabelFor(model => actionEdu.Nom, htmlAttributes: new { @class = "control-label col-md-2" })
  27. <div class="col-md-10">
  28. @Html.EditorFor(model => actionEdu.Nom, new { htmlAttributes = new { @class = "form-control" } })
  29. @Html.ValidationMessageFor(model => actionEdu.Nom, "", new { @class = "text-danger" })
  30. </div>
  31. </div>
  32. <div class="form-group">
  33. @Html.LabelFor(model => actionEdu.Description, htmlAttributes: new { @class = "control-label col-md-2" })
  34. <div class="col-md-10">
  35. @Html.EditorFor(model => actionEdu.Description, new { htmlAttributes = new { @class = "form-control" } })
  36. @Html.ValidationMessageFor(model => actionEdu.Description, "", new { @class = "text-danger" })
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. @Html.LabelFor(model => actionEdu.Neutralise, htmlAttributes: new { @class = "control-label col-md-2" })
  41. <div class="col-md-10">
  42. @Html.EditorFor(model => actionEdu.Neutralise, new { htmlAttributes = new { @class = "form-control" } })
  43. @Html.ValidationMessageFor(model => actionEdu.Neutralise, "", new { @class = "text-danger" })
  44. </div>
  45. </div>
  46. <div class="form-group">
  47. @Html.LabelFor(model => actionEdu.ActionEduThematiqueId, htmlAttributes: new { @class = "control-label col-md-2" })
  48. <div class="col-md-10">
  49. @Html.DropDownListFor(model => actionEdu.ActionEduThematiqueId, Model.Sel_Thematique, htmlAttributes: new { @class = "form-control" })
  50. @Html.ValidationMessageFor(model => actionEdu.ActionEduThematiqueId, "", new { @class = "text-danger" })
  51. </div>
  52. </div>
  53. <div class="form-group">
  54. <div class="col-md-offset-2 col-md-10">
  55. <input type="submit" value="Créer" class="btn btn-default" />
  56. </div>
  57. </div>
  58. </div>
  59. }
  60. <div>
  61. @Html.ActionLink("Retour à la liste", "Index")
  62. </div>
  63. @section Scripts {
  64. }