55 lines
1.4 KiB
Plaintext
55 lines
1.4 KiB
Plaintext
@model IEnumerable<ThAmCo.Stock.Models.Dto.ProductStockDto>
|
|
|
|
@{
|
|
ViewData["Title"] = "Low Stock Products";
|
|
}
|
|
|
|
<h1>Products with Low Stock</h1>
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.FirstOrDefault().ProductStock.ProductId)
|
|
</th>
|
|
<th>
|
|
Sale Price
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.FirstOrDefault().ProductStock.Stock)
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@{ int i = 1; }
|
|
@foreach (var item in Model)
|
|
{
|
|
<tr>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => i)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.ProductStock.ProductId)
|
|
</td>
|
|
<td>
|
|
£@Html.DisplayFor(modelItem => item.Price.ProductPrice)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.ProductStock.Stock)
|
|
</td>
|
|
<td>
|
|
<form asp-action="VendorProducts">
|
|
<input type="hidden" asp-for="@item.ProductStock.ProductId" />
|
|
<input type="submit" value="Order" class="btn btn-primary" />
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@Html.Display(i++.ToString())
|
|
}
|
|
</tbody>
|
|
</table>
|