CourseWorkElectronicsShop/ElectronicsShop/ElectronicsShopShopClientApp/Views/Home/CreateOrders.cshtml

45 lines
786 B
Plaintext

@using ElectronicsShopContracts.ViewModels
@model OrderViewModel
@{
ViewData["Title"] = "CreateOrders";
}
<div class="text-center">
<h1 class="display-4">Корзина</h1>
@{
<table class="table">
<thead>
<th>
<th>
Продукт
</th>
<th>
Количество
</th>
<th>
Сумма
</th>
</th>
</thead>
<tbody>
@if(Model!=null){
@foreach (var item in Model.ProductList)
{
<th>
<th>
@Html.DisplayFor(modelItem => item.Value.Item1.ProductName)
</th>
<th>
@Html.DisplayFor(modelItem => item.Value.Item2)
</th>
<th>
@Html.DisplayFor(modelItem => item.Value.Item1.Price*item.Value.Item2)
</th>
</th>
}
}
</tbody>
</table>
}
</div>