Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model IEnumerable<MVCSoftware.Models.Curso>@{
- ViewBag.Title = "Lista dos Cursos";
- if (Session["userID"] == null && Session["userName"] == null)
- {
- Response.Redirect("~/Utilizador/Index");
- }
- else
- {
- <h2>Lista dos Cursos</h2>
- <p>
- @Html.ActionLink("Create New", "Create")
- </p>
- <table class="table">
- <tr>
- <th>
- @Html.DisplayNameFor(model => model.CursoNome)
- </th>
- <th></th>
- </tr>
- @foreach (var item in Model)
- {
- <tr>
- <td>
- @Html.DisplayFor(modelItem => item.CursoNome)
- </td>
- <td>
- @Html.ActionLink("Edit", "Edit", new { id = item.CursoID }) |
- @Html.ActionLink("Details", "Details", new { id = item.CursoID }) |
- @Html.ActionLink("Delete", "Delete", new { id = item.CursoID })
- </td>
- </tr>
- }
- </table>
- }
Add Comment
Please, Sign In to add comment