Import.cshtml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. @using CD67.FicheCollege.MVC.Models
  2. @model ImportCollegeViewModel
  3. @{
  4. ViewBag.Title = "Import";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. }
  7. @*Selection de colleges à importer*@
  8. <div>
  9. @if(Model.colleges_ids.Count == 0)
  10. {
  11. <span> Aucun collège à importer </span>
  12. <div>
  13. @Html.ActionLink("Annuler", "Index", new { annee_id = Model.Annee_Id })
  14. </div>
  15. }
  16. else
  17. {
  18. using (Html.BeginForm())
  19. {
  20. @Html.AntiForgeryToken()
  21. @Html.HiddenFor(model => Model.Annee_Id)
  22. <table id="table-college-import" class="datatable table">
  23. <thead>
  24. </thead>
  25. <tbody>
  26. @*@foreach (ImportCollegeItem item in Model.liste)*@
  27. @for(int i=0; i < Model.selection.Count; i++)
  28. {
  29. <tr>
  30. <td>
  31. @Html.EditorFor(model => Model.selection[i])
  32. @Html.HiddenFor(model => Model.colleges_ids[i])
  33. </td>
  34. <td>
  35. @Html.DisplayFor(model => Model.colleges_rnes[i])
  36. </td>
  37. <td>
  38. @Html.DisplayFor(model => Model.colleges_libs[i])
  39. </td>
  40. </tr>
  41. }
  42. </tbody>
  43. </table>
  44. <div class="form-group">
  45. <span style="margin-right:20px;">
  46. <input type="submit" value="Importer" class="btn btn-default" />
  47. </span>
  48. <span>
  49. @Html.ActionLink("Annuler", "Index", new { annee_id = Model.Annee_Id })
  50. </span>
  51. </div>
  52. }
  53. }
  54. </div>