Guest User

Untitled

a guest
Apr 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. @model IEnumerable<MVCSoftware.Models.Curso>@{
  2. ViewBag.Title = "Lista dos Cursos";
  3. if (Session["userID"] == null && Session["userName"] == null)
  4. {
  5. Response.Redirect("~/Utilizador/Index");
  6. }
  7. else
  8. {
  9. <h2>Lista dos Cursos</h2>
  10.  
  11. <p>
  12. @Html.ActionLink("Create New", "Create")
  13. </p>
  14. <table class="table">
  15. <tr>
  16. <th>
  17. @Html.DisplayNameFor(model => model.CursoNome)
  18. </th>
  19. <th></th>
  20. </tr>
  21.  
  22. @foreach (var item in Model)
  23. {
  24. <tr>
  25. <td>
  26. @Html.DisplayFor(modelItem => item.CursoNome)
  27. </td>
  28. <td>
  29. @Html.ActionLink("Edit", "Edit", new { id = item.CursoID }) |
  30. @Html.ActionLink("Details", "Details", new { id = item.CursoID }) |
  31. @Html.ActionLink("Delete", "Delete", new { id = item.CursoID })
  32. </td>
  33. </tr>
  34. }
  35.  
  36. </table>
  37. }
Add Comment
Please, Sign In to add comment