ComputerHardwareStore_YouAr.../ComputerHardwareStore/VendorClient/Views/Home/PurchaseCreate.cshtml

44 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2024-05-01 19:39:07 +04:00
@using ComputerHardwareStoreContracts.ViewModels
@model List<ProductViewModel>
@{
ViewData["Title"] = "PurchaseCreate";
}
<div class="text-center">
<h2 class="display-4 mb-5">Создать покупку</h2>
</div>
<form method="post">
@{
if (Model == null)
{
<h3 class="display-4">Надо войти!</h3>
return;
}
<div class="row mb-5">
<div class="col-4">Сумма:</div>
<div class="col-8"><input type="number" id="summ" name="summ" /></div>
</div>
<div class="row mb-5">
<div class="col-4">Адрес:</div>
<div class="col-8"><input type="text" id="address" name="address" /></div>
</div>
<div class="row mb-5">
<div class="col-4">Товары:</div>
<div class="col-8">
<select name="products" multiple>
@foreach (var product in Model)
{
<option value="@product.Id">@product.Name</option>
}
</select>
</div>
</div>
<div class="row mb-5">
<div class="col-8">
</div>
<div class="col-4">
<input type="submit" value="Создать" class="btn btn-success" />
</div>
</div>
}
</form>