55 lines
1021 B
Plaintext
55 lines
1021 B
Plaintext
|
@using ElectronicsShopContracts.ViewModels
|
||
|
|
||
|
@model OrderViewModel
|
||
|
@{
|
||
|
ViewData["Title"] = "Create Order";
|
||
|
}
|
||
|
|
||
|
|
||
|
<div class="row">
|
||
|
<p>
|
||
|
<a asp-action="AddProduct">Добавть продукт в корзину</a>
|
||
|
</p>
|
||
|
<div class="col-4">
|
||
|
<input type="submit" value="Создать заказ" class="btn btn-primary" />
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<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>
|