44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
@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>
|