Add CRUD admin pages for screens.

This commit is contained in:
2019-06-01 22:59:18 +01:00
parent 63c2f4c7a8
commit 2022dc0080
20 changed files with 1200 additions and 1 deletions

View File

@@ -0,0 +1,52 @@
@using Cicm.Database.Models
@model IEnumerable<Cicm.Database.Models.ScreensByMachine>
@{
ViewData["Title"] = "Index";
}
<h1>Index</h1>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Screen)
</th>
<th>
@Html.DisplayNameFor(model => model.Machine)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach(ScreensByMachine item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Screen.Type)
</td>
<td>
@Html.DisplayFor(modelItem => item.Machine.Name)
</td>
<td>
<a asp-action="Edit"
asp-route-id="@item.Id">
Edit
</a> |
<a asp-action="Details"
asp-route-id="@item.Id">
Details
</a> |
<a asp-action="Delete"
asp-route-id="@item.Id">
Delete
</a>
</td>
</tr>
}
</tbody>
</table>