@model ThAmCo.Events.Models.EventDetailsModel @{ ViewData["Title"] = "Details"; }

Details

Event


@Html.DisplayNameFor(model => model.Title)
@Html.DisplayFor(model => model.Title)
@Html.DisplayNameFor(model => model.Date)
@Html.DisplayFor(model => model.Date)
@Html.DisplayNameFor(model => model.Duration)
@Html.DisplayFor(model => model.Duration)
@Html.DisplayNameFor(model => model.TypeId)
@Html.DisplayFor(model => model.TypeId)

@Html.DisplayNameFor(model => model.Reservation)

@if (Model.Reservation == null) {
Select Venue
} else {
@Html.DisplayNameFor(model => model.Reservation.VenueCode)
@Html.DisplayFor(model => model.Reservation.VenueCode)
@Html.DisplayNameFor(model => model.Reservation.EventDate)
@Html.DisplayFor(model => model.Reservation.EventDate)
@Html.DisplayNameFor(model => model.Reservation.whenMade)
@Html.DisplayFor(model => model.Reservation.whenMade)
Remove Venue
}

@Html.DisplayNameFor(model => model.FoodReference)

@if (Model.FoodReference == 0) {
Select Menu
} else {
Menu Number
@Html.DisplayFor(model => model.FoodReference)
}
Edit | Back to List
Add Customer
@foreach (var item in Model.Bookings) { }
@Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Customer.Surname) @Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Customer.FirstName) @Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Customer.Email) @Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Attended)
@Html.DisplayFor(modelItem => item.Customer.Surname) @Html.DisplayFor(modelItem => item.Customer.FirstName) @Html.DisplayFor(modelItem => item.Customer.Email) @Html.DisplayFor(modelItem => item.Attended)
@Html.Hidden("EventID", Model.Id) @Html.Hidden("CustomerID", item.CustomerId)
Total Attendees: @Model.Bookings.Count
Add Staff
@foreach (var item in Model.Staffing) { }
@Html.DisplayNameFor(model => model.Staffing.FirstOrDefault().Staff.Surname) @Html.DisplayNameFor(model => model.Staffing.FirstOrDefault().Staff.FirstName) @Html.DisplayNameFor(model => model.Staffing.FirstOrDefault().Staff.Email) @Html.DisplayNameFor(model => model.Staffing.FirstOrDefault().Staff.FirstAid)
@Html.DisplayFor(modelItem => item.Staff.Surname) @Html.DisplayFor(modelItem => item.Staff.FirstName) @Html.DisplayFor(modelItem => item.Staff.Email) @Html.DisplayFor(modelItem => item.Staff.FirstAid)
@Html.Hidden("EventID", Model.Id) @Html.Hidden("StaffID", item.StaffId)

@if (Model.Staffing.Count < Math.Ceiling((double)Model.Bookings.Count / 10)) { @Html.Raw("⚠ Only have " + Model.Staffing.Count + " staff members, " + Math.Ceiling((double)Model.Bookings.Count / 10) + " are required.
") }

@if (Model.Staffing == null || !Model.Staffing.Any(s => s.Staff.FirstAid)) { @Html.Raw("⚠ There is no first aid staff member.") }

@section Scripts { }