@model IEnumerable @{ ViewData["Title"] = "Index"; }

Index

Create New

@foreach (var item in Model) { }
@Html.DisplayNameFor(model => model.Title) @Html.DisplayNameFor(model => model.Date) @Html.DisplayNameFor(model => model.Duration) @Html.DisplayNameFor(model => model.TypeId) BookingCount VenueReference
@Html.DisplayFor(modelItem => item.Title) @Html.DisplayFor(modelItem => item.Date) @Html.DisplayFor(modelItem => item.Duration) @Html.DisplayFor(modelItem => item.TypeId) @item.Bookings.Count @Html.DisplayFor(modelItem => item.VenueReference) @if (item.Staffings.Count < Math.Ceiling((double)item.Bookings.Count / 10)) { @Html.Raw("⚠ Only have " + item.Staffings.Count + " staff members, " + Math.Ceiling((double)item.Bookings.Count / 10) + " are required.") } @if (item.Staffings == null || !item.Staffings.Any(s => s.Staff.FirstAid)) { @Html.Raw("⚠ There is no first aid staff member.") } Edit | Details | Delete