Y2S1-Web_Apps_and_Services/ThAmCo.Events/Views/Events/AddStaff.cshtml

56 lines
1.6 KiB
Plaintext
Raw Normal View History

2020-06-07 21:36:12 +00:00
@model ThAmCo.Events.Models.ViewModels.Events.EventAddStaffModel
@{
ViewData["Title"] = "AddStaff";
}
<h2>AddStaff</h2>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Staff.FirstOrDefault().Surname)
</th>
<th>
@Html.DisplayNameFor(model => model.Staff.FirstOrDefault().FirstName)
</th>
<th>
@Html.DisplayNameFor(model => model.Staff.FirstOrDefault().Email)
</th>
<th>
@Html.DisplayNameFor(model => model.Staff.FirstOrDefault().FirstAid)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Staff)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Surname)
</td>
<td>
@Html.DisplayFor(modelItem => item.FirstName)
</td>
<td>
@Html.DisplayFor(modelItem => item.Email)
</td>
<td>
@Html.DisplayFor(modelItem => item.FirstAid)
</td>
<td>
<form asp-action="AddStaff">
<input type="hidden" asp-for="EventId" />
@Html.Hidden("EventID", Model.EventId)
@Html.Hidden("StaffID", item.Id)
<input type="submit" value="Select" />
</form>
</td>
</tr>
}
</tbody>
</table>