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

60 lines
1.7 KiB
Plaintext

@model ThAmCo.Events.Models.SelectVenueModel
@{
ViewData["Title"] = "SelectVenue";
}
<h2>SelectVenue</h2>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Venues.FirstOrDefault().Code)
</th>
<th>
@Html.DisplayNameFor(model => model.Venues.FirstOrDefault().Name)
</th>
<th>
@Html.DisplayNameFor(model => model.Venues.FirstOrDefault().Capacity)
</th>
<th>
@Html.DisplayNameFor(model => model.Venues.FirstOrDefault().Date)
</th>
<th>
@Html.DisplayNameFor(model => model.Venues.FirstOrDefault().CostPerHour)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Venues) {
<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)
@Html.Hidden("Id", Model.Id)
<input type="submit" value="Reserve" />
</form>
</td>
</tr>
}
</tbody>
</table>