Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @using ADSProjectLab.Utilities
- @model IEnumerable<ADSProjectLab.Models.Estudiante>
- @{
- ViewBag.Title = "Estudiantes";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- <h2>Listado de estudiantes</h2>
- <hr />
- <p>
- @Html.ActionLink("Crear", "Form", new { _operacion = Operacion.Insertar }, new { @class = "btn btn-primary" })
- </p>
- @if (Model.Count() > 0)
- {
- <table class="table table-bordered table-striped">
- <tr>
- <th>
- @Html.DisplayNameFor(model => model.Codigo)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Email)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Nombres)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Apellidos)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.IdCarrera)
- </th>
- <th></th>
- </tr>
- @foreach (var item in Model)
- {
- <tr>
- <td>
- @Html.DisplayFor(modelItem => item.Codigo)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Email)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Nombres)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Apellidos)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Carrera.Nombre)
- </td>
- <td>
- @Html.ActionLink("Editar", "Form", new { id = item.Id, _operacion = Operacion.Modificar },
- new { @class = "btn btn-xs btn-warning" })
- @Html.ActionLink("Ver", "Form", new { id = item.Id, _operacion = Operacion.Ver },
- new { @class = "btn btn-xs btn-default" })
- @Html.ActionLink("Eliminar", "Delete", new { id = item.Id, _operacion = Operacion.Eliminar }
- , new { @class = "btn btn-xs btn-danger eliminar" })
- </td>
- </tr>
- }
- </table>
- }
- else
- {
- <h4 class="text-center">No hay datos.</h4>
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement