UTB.Eshop_2021/UTB.Eshop.Web/Areas/Admin/Views/Orders/Index.cshtml

54 lines
1.4 KiB
Plaintext

@model IEnumerable<UTB.Eshop.Web.Models.Entity.Order>
@{
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.DateTimeCreated)
</th>
<th>
@Html.DisplayNameFor(model => model.OrderNumber)
</th>
<th>
@Html.DisplayNameFor(model => model.TotalPrice)
</th>
<th>
@Html.DisplayNameFor(model => model.User)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.DateTimeCreated)
</td>
<td>
@Html.DisplayFor(modelItem => item.OrderNumber)
</td>
<td>
@Html.DisplayFor(modelItem => item.TotalPrice)
</td>
<td>
@Html.DisplayFor(modelItem => item.User.Id)
</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>