Y2S1-Web_Apps_and_Services/ThAmCo.Events/Views/Events/FindVenueResults.cshtml
2020-06-07 22:36:12 +01:00

61 lines
1.7 KiB
Plaintext

@model IEnumerable<ThAmCo.Events.Models.VenueDto>
@{
ViewData["Title"] = "FindVenueResults";
}
<h2>FindVenueResults</h2>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.FirstOrDefault().Code)
</th>
<th>
@Html.DisplayNameFor(model => model.FirstOrDefault().Name)
</th>
<th>
@Html.DisplayNameFor(model => model.FirstOrDefault().Capacity)
</th>
<th>
@Html.DisplayNameFor(model => model.FirstOrDefault().Date)
</th>
<th>
@Html.DisplayNameFor(model => model.FirstOrDefault().CostPerHour)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Code)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Capacity)
</td>
<td>
@Html.DisplayFor(modelItem => item.Date)
</td>
<td>
@Html.DisplayFor(modelItem => item.CostPerHour)
</td>
<td>
<form asp-action="CreateReservation">
@Html.Hidden("VenueDate", item.Date)
@Html.Hidden("VenueCode", item.Code)
<input type="submit" value="Reserve" />
</form>
</td>
</tr>
}
</tbody>
</table>