Advertisement
ingomarmurcia

Index.cshtml - Estudiantes

Mar 21st, 2020
3,165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 1.43 KB | None | 0 0
  1. @using ADSProjectLab.Utilities
  2. @model IEnumerable<ADSProjectLab.Models.Estudiante>
  3.  
  4. @{
  5.     ViewBag.Title = "Estudiantes";
  6.     Layout = "~/Views/Shared/_Layout.cshtml";
  7. }
  8.  
  9. <h2>Listado de estudiantes</h2>
  10.  
  11. <p>
  12.     @Html.ActionLink("Crear", "Form", new { _operacion = Operacion.Insertar })
  13. </p>
  14. <table class="table">
  15.     <tr>
  16.         <th>
  17.             @Html.DisplayNameFor(model => model.Codigo)
  18.         </th>
  19.         <th>
  20.             @Html.DisplayNameFor(model => model.Email)
  21.         </th>
  22.         <th>
  23.             @Html.DisplayNameFor(model => model.Nombres)
  24.         </th>
  25.         <th>
  26.             @Html.DisplayNameFor(model => model.Apellidos)
  27.         </th>
  28.         <th></th>
  29.     </tr>
  30.  
  31. @foreach (var item in Model) {
  32.     <tr>
  33.         <td>
  34.             @Html.DisplayFor(modelItem => item.Codigo)
  35.         </td>
  36.         <td>
  37.             @Html.DisplayFor(modelItem => item.Email)
  38.         </td>
  39.         <td>
  40.             @Html.DisplayFor(modelItem => item.Nombres)
  41.         </td>
  42.         <td>
  43.             @Html.DisplayFor(modelItem => item.Apellidos)
  44.         </td>
  45.         <td>
  46.             @Html.ActionLink("Editar", "Form", new { id=item.Id, _operacion = Operacion.Modificar }) |
  47.             @Html.ActionLink("Ver", "Form", new { id=item.Id, _operacion = Operacion.Ver }) |
  48.             @Html.ActionLink("Eliminar", "Delete", new { id=item.Id, _operacion = Operacion.Eliminar })
  49.         </td>
  50.     </tr>
  51. }
  52.  
  53. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement