cs11dotnet7/vscode/PracticalApps/Northwind.Web/Pages/Suppliers.cshtml
2022-03-13 16:17:01 +00:00

43 lines
1 KiB
Plaintext

@page
@using Packt.Shared
@model Northwind.Web.Pages.SuppliersModel
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
<div class="row">
<h1 class="display-2">Suppliers</h1>
<table class="table">
<thead class="thead-inverse">
<tr>
<th>Company Name</th>
<th>Country</th>
<th>Phone</th>
</tr>
</thead>
<tbody>
@if (Model.Suppliers is not null)
{
@foreach(Supplier s in Model.Suppliers)
{
<tr>
<td>@s.CompanyName</td>
<td>@s.Country</td>
<td>@s.Phone</td>
</tr>
}
}
</tbody>
</table>
</div>
<div class="row">
<p>Enter details for a new supplier:</p>
<form method="POST">
<div><input asp-for="Supplier.CompanyName"
placeholder="Company Name" /></div>
<div><input asp-for="Supplier.Country"
placeholder="Country" /></div>
<div><input asp-for="Supplier.Phone"
placeholder="Phone" /></div>
<input type="submit" />
</form>
</div>