Index.cshtml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. @using CD67.FicheCollege.MVC.Models
  2. @model TopModel
  3. @*IEnumerable<CD67.FicheCollege.Entity.College>*@
  4. @{
  5. ViewBag.Title = "Liste";
  6. Layout = "~/Views/Shared/_Layout.cshtml";
  7. IEnumerable<CD67.FicheCollege.Entity.College> colleges = Model.Obj;
  8. }
  9. <h2>Index</h2>
  10. <p>
  11. <a href="@Url.Action("Create")">
  12. <span class="glyphicon glyphicon-plus-sign fa-2x color1" style="vertical-align: middle" aria-hidden="true"></span>
  13. Ajouter un nouveau collège
  14. </a>
  15. </p>
  16. <table class="table">
  17. <tr>
  18. <th>
  19. @Html.DisplayNameFor(model => (model.Obj as College).Id)
  20. </th>
  21. <th>
  22. @Html.DisplayNameFor(model => (model.Obj as College).Libelle)
  23. </th>
  24. <th>
  25. @Html.DisplayNameFor(model => (model.Obj as College).Adresse)
  26. </th>
  27. <th>
  28. @Html.DisplayNameFor(model => (model.Obj as College).CDC)
  29. </th>
  30. <th>
  31. @Html.DisplayNameFor(model => (model.Obj as College).Tel)
  32. </th>
  33. <th>
  34. @Html.DisplayNameFor(model => (model.Obj as College).Fax)
  35. </th>
  36. <th>
  37. @Html.DisplayNameFor(model => (model.Obj as College).Email)
  38. </th>
  39. <th>
  40. @Html.DisplayNameFor(model => (model.Obj as College).Territoire.Libelle)
  41. </th>
  42. <th>
  43. @Html.DisplayNameFor(model => (model.Obj as College).TypeCollege.Libelle)
  44. </th>
  45. </tr>
  46. @foreach (College item in Model.Obj) {
  47. <tr>
  48. <td>
  49. @Html.ActionLink(item.CodeRne.ToString(), "Details", new { id = item.Id })
  50. </td>
  51. <td>
  52. @Html.DisplayFor(modelItem => item.Libelle)
  53. </td>
  54. <td>
  55. @Html.DisplayFor(modelItem => item.AdresseComplete)
  56. </td>
  57. <td>
  58. @Html.DisplayFor(modelItem => item.CDC)
  59. </td>
  60. <td>
  61. @Html.DisplayFor(modelItem => item.Tel)
  62. </td>
  63. <td>
  64. @Html.DisplayFor(modelItem => item.Fax)
  65. </td>
  66. <td>
  67. @Html.DisplayFor(modelItem => item.Email)
  68. </td>
  69. <td>
  70. @Html.DisplayFor(modelItem => item.Territoire.Libelle)
  71. </td>
  72. <td>
  73. @Html.DisplayFor(modelItem => item.TypeCollege.Libelle)
  74. </td>
  75. </tr>
  76. }
  77. </table>