Upload project.
This commit is contained in:
48
ThAmCo.Events/Views/Customers/Create.cshtml
Normal file
48
ThAmCo.Events/Views/Customers/Create.cshtml
Normal file
@@ -0,0 +1,48 @@
|
||||
@model ThAmCo.Events.Models.CustomerCreateModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<h4>Customer</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Surname" class="control-label"></label>
|
||||
<input asp-for="Surname" class="form-control" />
|
||||
<span asp-validation-for="Surname" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="FirstName" class="control-label"></label>
|
||||
<input asp-for="FirstName" class="form-control" />
|
||||
<span asp-validation-for="FirstName" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="control-label"></label>
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="InitialEvent" class="control-label"></label>
|
||||
<select asp-for="InitialEvent" class="form-control" asp-items="ViewBag.EventLists"></select>
|
||||
<span asp-validation-for="InitialEvent" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
}
|
||||
44
ThAmCo.Events/Views/Customers/Delete.cshtml
Normal file
44
ThAmCo.Events/Views/Customers/Delete.cshtml
Normal file
@@ -0,0 +1,44 @@
|
||||
@model ThAmCo.Events.Data.Customer
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Customer</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Surname)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Surname)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FirstName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FirstName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Email)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Email)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input type="submit" value="Delete" class="btn btn-default" />
|
||||
</form>
|
||||
|
||||
<form asp-action="AnonDelete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input type="submit" value="Delete Anonymously" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</form>
|
||||
</div>
|
||||
80
ThAmCo.Events/Views/Customers/Details.cshtml
Normal file
80
ThAmCo.Events/Views/Customers/Details.cshtml
Normal file
@@ -0,0 +1,80 @@
|
||||
@model ThAmCo.Events.Data.Customer
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>Customer</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Surname)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Surname)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FirstName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FirstName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Email)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Email)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Event.Title)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Event.Date)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Event.Duration)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Event.TypeId)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Attended)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.Bookings)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Event.Title)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Event.Date)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Event.Duration)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Event.TypeId)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Attended)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
44
ThAmCo.Events/Views/Customers/Edit.cshtml
Normal file
44
ThAmCo.Events/Views/Customers/Edit.cshtml
Normal file
@@ -0,0 +1,44 @@
|
||||
@model ThAmCo.Events.Data.Customer
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<h4>Customer</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Surname" class="control-label"></label>
|
||||
<input asp-for="Surname" class="form-control" />
|
||||
<span asp-validation-for="Surname" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="FirstName" class="control-label"></label>
|
||||
<input asp-for="FirstName" class="form-control" />
|
||||
<span asp-validation-for="FirstName" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="control-label"></label>
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
}
|
||||
47
ThAmCo.Events/Views/Customers/Index.cshtml
Normal file
47
ThAmCo.Events/Views/Customers/Index.cshtml
Normal file
@@ -0,0 +1,47 @@
|
||||
@model IEnumerable<ThAmCo.Events.Data.Customer>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Surname)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FirstName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Email)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Surname)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.FirstName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Email)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
49
ThAmCo.Events/Views/Events/AddCustomer.cshtml
Normal file
49
ThAmCo.Events/Views/Events/AddCustomer.cshtml
Normal file
@@ -0,0 +1,49 @@
|
||||
@model ThAmCo.Events.Models.ViewModels.Events.EventAddCustomerModel
|
||||
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "AddCustomer";
|
||||
}
|
||||
|
||||
<h2>AddCustomer</h2>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Customer.FirstOrDefault().Surname)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Customer.FirstOrDefault().FirstName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Customer.FirstOrDefault().Email)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.Customer)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Surname)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.FirstName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Email)
|
||||
</td>
|
||||
<td>
|
||||
<form asp-action="AddCustomer">
|
||||
<input type="hidden" asp-for="EventId" />
|
||||
@Html.Hidden("EventID", Model.EventId)
|
||||
@Html.Hidden("CustomerID", item.Id)
|
||||
<input type="submit" value="Select" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
48
ThAmCo.Events/Views/Events/AddMenu.cshtml
Normal file
48
ThAmCo.Events/Views/Events/AddMenu.cshtml
Normal file
@@ -0,0 +1,48 @@
|
||||
@model ThAmCo.Events.Models.ViewModels.Events.EventAddMenuModel
|
||||
@{
|
||||
ViewData["Title"] = "AddMenu";
|
||||
}
|
||||
|
||||
<h2>AddMenu</h2>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Menus.FirstOrDefault().Id)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Menus.FirstOrDefault().Items)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Menus.FirstOrDefault().Price)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.Menus)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Id)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Items)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Price)
|
||||
</td>
|
||||
<td>
|
||||
<form asp-action="AddMenu">
|
||||
<input type="hidden" asp-for="EventId" />
|
||||
@Html.Hidden("EventID", Model.EventId)
|
||||
@Html.Hidden("MenuID", item.Id)
|
||||
<input type="submit" value="Select" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
55
ThAmCo.Events/Views/Events/AddStaff.cshtml
Normal file
55
ThAmCo.Events/Views/Events/AddStaff.cshtml
Normal file
@@ -0,0 +1,55 @@
|
||||
@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>
|
||||
|
||||
48
ThAmCo.Events/Views/Events/Create.cshtml
Normal file
48
ThAmCo.Events/Views/Events/Create.cshtml
Normal file
@@ -0,0 +1,48 @@
|
||||
@model ThAmCo.Events.Models.EventCreateModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<h4>Event</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Title" class="control-label"></label>
|
||||
<input asp-for="Title" class="form-control" />
|
||||
<span asp-validation-for="Title" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Date" class="control-label"></label>
|
||||
<input type="date" asp-for="Date" class="form-control" />
|
||||
<span asp-validation-for="Date" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Duration" class="control-label"></label>
|
||||
<input type="time" asp-for="Duration" class="form-control" />
|
||||
<span asp-validation-for="Duration" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="TypeId" class="control-label"></label>
|
||||
<input asp-for="TypeId" class="form-control"></input>
|
||||
<span asp-validation-for="TypeId" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Continue" class="btn btn-default" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
}
|
||||
46
ThAmCo.Events/Views/Events/CreateWithVenue.cshtml
Normal file
46
ThAmCo.Events/Views/Events/CreateWithVenue.cshtml
Normal file
@@ -0,0 +1,46 @@
|
||||
@model ThAmCo.Events.Data.Event
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "CreateWithVenue";
|
||||
}
|
||||
|
||||
<h2>CreateWithVenue</h2>
|
||||
|
||||
<h4>Event</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Title" class="control-label"></label>
|
||||
<input asp-for="Title" class="form-control" />
|
||||
<span asp-validation-for="Title" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Date" class="control-label"></label>
|
||||
<input asp-for="Date" class="form-control" />
|
||||
<span asp-validation-for="Date" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Duration" class="control-label"></label>
|
||||
<input asp-for="Duration" class="form-control" />
|
||||
<span asp-validation-for="Duration" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="TypeId" class="control-label"></label>
|
||||
<input asp-for="TypeId" class="form-control" />
|
||||
<span asp-validation-for="TypeId" class="text-danger"></span>
|
||||
</div>
|
||||
@Html.Hidden("VenueRefernce", Model.VenueReference)
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
45
ThAmCo.Events/Views/Events/Delete.cshtml
Normal file
45
ThAmCo.Events/Views/Events/Delete.cshtml
Normal file
@@ -0,0 +1,45 @@
|
||||
@model ThAmCo.Events.Data.Event
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Event</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Title)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Title)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Date)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Date)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Duration)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Duration)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.TypeId)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.TypeId)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</form>
|
||||
</div>
|
||||
251
ThAmCo.Events/Views/Events/Details.cshtml
Normal file
251
ThAmCo.Events/Views/Events/Details.cshtml
Normal file
@@ -0,0 +1,251 @@
|
||||
@model ThAmCo.Events.Models.EventDetailsModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>Event</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal venue-details">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Title)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Title)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Date)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Date)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Duration)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Duration)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.TypeId)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.TypeId)
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal venue-details">
|
||||
<dt>
|
||||
<h4><b><u>@Html.DisplayNameFor(model => model.Reservation)</u></b></h4>
|
||||
</dt>
|
||||
|
||||
@if (Model.Reservation == null)
|
||||
{
|
||||
<dd>
|
||||
<a asp-action="SelectVenue" asp-route-id="@Model.Id">Select Venue</a>
|
||||
</dd>
|
||||
}
|
||||
else
|
||||
{
|
||||
<dd></dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Reservation.VenueCode)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Reservation.VenueCode)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Reservation.EventDate)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Reservation.EventDate)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Reservation.whenMade)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Reservation.whenMade)
|
||||
</dd>
|
||||
<dt></dt>
|
||||
<dd>
|
||||
<a asp-action="FreeReservation" asp-route-id="@Model.Id">Remove Venue</a>
|
||||
</dd>
|
||||
}
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal venue-details">
|
||||
<dt>
|
||||
<h4><b><u>@Html.DisplayNameFor(model => model.FoodReference)</u></b></h4>
|
||||
</dt>
|
||||
@if (Model.FoodReference == 0)
|
||||
{
|
||||
<dd>
|
||||
<a asp-action="AddMenu" asp-route-id="@Model.Id">Select Menu</a>
|
||||
</dd>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<dd></dd>
|
||||
<dt>
|
||||
Menu Number
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FoodReference)
|
||||
</dd>
|
||||
|
||||
}
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="AddCustomer" asp-route-id="@Model.Id">Add Customer</a>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Customer.Surname)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Customer.FirstName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Customer.Email)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Bookings.FirstOrDefault().Attended)
|
||||
</th>
|
||||
<th>
|
||||
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.Bookings)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Customer.Surname)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Customer.FirstName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Customer.Email)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Attended)
|
||||
</td>
|
||||
<td>
|
||||
<button onclick="toggleAttendance(@item.Customer.Id, @Model.Id)">Toggle Attendance</button>
|
||||
</td>
|
||||
<td>
|
||||
<form asp-action="RemoveCustomer">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
@Html.Hidden("EventID", Model.Id)
|
||||
@Html.Hidden("CustomerID", item.CustomerId)
|
||||
<input type="submit" value="Remove" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Total Attendees: @Model.Bookings.Count
|
||||
|
||||
<div>
|
||||
<a asp-action="AddStaff" asp-route-id="@Model.Id">Add Staff</a>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Staffing.FirstOrDefault().Staff.Surname)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Staffing.FirstOrDefault().Staff.FirstName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Staffing.FirstOrDefault().Staff.Email)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Staffing.FirstOrDefault().Staff.FirstAid)
|
||||
</th>
|
||||
<th>
|
||||
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.Staffing)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Staff.Surname)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Staff.FirstName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Staff.Email)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Staff.FirstAid)
|
||||
</td>
|
||||
<td>
|
||||
<form asp-action="RemoveStaff">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
@Html.Hidden("EventID", Model.Id)
|
||||
@Html.Hidden("StaffID", item.StaffId)
|
||||
<input type="submit" value="Remove" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h4>
|
||||
@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. <br>")
|
||||
}
|
||||
</h4>
|
||||
<h4>
|
||||
@if (Model.Staffing == null || !Model.Staffing.Any(s => s.Staff.FirstAid))
|
||||
{
|
||||
@Html.Raw("⚠ There is no first aid staff member.")
|
||||
}
|
||||
</h4>
|
||||
|
||||
|
||||
|
||||
@section Scripts {
|
||||
|
||||
<script type="text/javascript">
|
||||
function toggleAttendance(cID, eID)
|
||||
{
|
||||
$.ajax({
|
||||
url: "http://localhost:22263/Events/RegisterAttendance?EventId=" + eID + "&CustomerId=" + cID,
|
||||
type: "POST",
|
||||
crossDomain: true,
|
||||
success: function (result) { window.location.reload(false);},
|
||||
failiure: function () { }
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
}
|
||||
39
ThAmCo.Events/Views/Events/Edit.cshtml
Normal file
39
ThAmCo.Events/Views/Events/Edit.cshtml
Normal file
@@ -0,0 +1,39 @@
|
||||
@model ThAmCo.Events.Data.Event
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<h4>Event</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Title" class="control-label"></label>
|
||||
<input asp-for="Title" class="form-control" />
|
||||
<span asp-validation-for="Title" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Duration" class="control-label"></label>
|
||||
<input asp-for="Duration" class="form-control" />
|
||||
<span asp-validation-for="Duration" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
}
|
||||
30
ThAmCo.Events/Views/Events/FindVenue.cshtml
Normal file
30
ThAmCo.Events/Views/Events/FindVenue.cshtml
Normal file
@@ -0,0 +1,30 @@
|
||||
@model ThAmCo.Events.Models.ViewModels.Events.EventFindVenueModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "FindVenue";
|
||||
}
|
||||
|
||||
<h2>FindVenue</h2>
|
||||
|
||||
<form asp-action="FindVenueResults">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="EventType" class="control-label"></label>
|
||||
<input asp-for="EventType" class="form-control" />
|
||||
<span asp-validation-for="EventType" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="StartDate" class="control-label"></label>
|
||||
<input type="date" asp-for="StartDate" class="form-control" />
|
||||
<span asp-validation-for="StartDate" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="EndDate" class="control-label"></label>
|
||||
<input type="date" asp-for="EndDate" class="form-control" />
|
||||
<span asp-validation-for="EndDate" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Find Venues" class="btn btn-default" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
60
ThAmCo.Events/Views/Events/FindVenueResults.cshtml
Normal file
60
ThAmCo.Events/Views/Events/FindVenueResults.cshtml
Normal file
@@ -0,0 +1,60 @@
|
||||
@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>
|
||||
|
||||
77
ThAmCo.Events/Views/Events/Index.cshtml
Normal file
77
ThAmCo.Events/Views/Events/Index.cshtml
Normal file
@@ -0,0 +1,77 @@
|
||||
@model IEnumerable<ThAmCo.Events.Data.Event>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Title)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Date)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Duration)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TypeId)
|
||||
</th>
|
||||
<th>
|
||||
BookingCount
|
||||
</th>
|
||||
<th>
|
||||
VenueReference
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Title)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Date)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Duration)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.TypeId)
|
||||
</td>
|
||||
<td>
|
||||
@item.Bookings.Count
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.VenueReference)
|
||||
</td>
|
||||
<td>
|
||||
@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.")
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (item.Staffings == null || !item.Staffings.Any(s => s.Staff.FirstAid))
|
||||
{
|
||||
@Html.Raw("⚠ There is no first aid staff member.")
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
59
ThAmCo.Events/Views/Events/SelectVenue.cshtml
Normal file
59
ThAmCo.Events/Views/Events/SelectVenue.cshtml
Normal file
@@ -0,0 +1,59 @@
|
||||
@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>
|
||||
35
ThAmCo.Events/Views/Food/Create.cshtml
Normal file
35
ThAmCo.Events/Views/Food/Create.cshtml
Normal file
@@ -0,0 +1,35 @@
|
||||
@model ThAmCo.Events.Data.Food
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<h4>Food</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Items" class="control-label"></label>
|
||||
<input asp-for="Items" class="form-control" />
|
||||
<span asp-validation-for="Items" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Price" class="control-label"></label>
|
||||
<input asp-for="Price" class="form-control" />
|
||||
<span asp-validation-for="Price" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
38
ThAmCo.Events/Views/Food/Delete.cshtml
Normal file
38
ThAmCo.Events/Views/Food/Delete.cshtml
Normal file
@@ -0,0 +1,38 @@
|
||||
@model ThAmCo.Events.Data.Food
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Food</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Id)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Id)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Items)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Items)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Price)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Price)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</form>
|
||||
</div>
|
||||
30
ThAmCo.Events/Views/Food/Details.cshtml
Normal file
30
ThAmCo.Events/Views/Food/Details.cshtml
Normal file
@@ -0,0 +1,30 @@
|
||||
@model ThAmCo.Events.Data.Food
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>Food</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Items)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Items)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Price)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Price)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
36
ThAmCo.Events/Views/Food/Edit.cshtml
Normal file
36
ThAmCo.Events/Views/Food/Edit.cshtml
Normal file
@@ -0,0 +1,36 @@
|
||||
@model ThAmCo.Events.Data.Food
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<h4>Food</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Items" class="control-label"></label>
|
||||
<input asp-for="Items" class="form-control" />
|
||||
<span asp-validation-for="Items" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Price" class="control-label"></label>
|
||||
<input asp-for="Price" class="form-control" />
|
||||
<span asp-validation-for="Price" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
41
ThAmCo.Events/Views/Food/Index.cshtml
Normal file
41
ThAmCo.Events/Views/Food/Index.cshtml
Normal file
@@ -0,0 +1,41 @@
|
||||
@model IEnumerable<ThAmCo.Events.Data.Food>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Items)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Price)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Items)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Price)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
43
ThAmCo.Events/Views/GuestBookings/Create.cshtml
Normal file
43
ThAmCo.Events/Views/GuestBookings/Create.cshtml
Normal file
@@ -0,0 +1,43 @@
|
||||
@model ThAmCo.Events.Data.GuestBooking
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<h4>GuestBooking</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="CustomerId" class="control-label"></label>
|
||||
<select asp-for="CustomerId" class ="form-control" asp-items="ViewBag.CustomerId"></select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="EventId" class="control-label"></label>
|
||||
<select asp-for="EventId" class ="form-control" asp-items="ViewBag.EventId"></select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input asp-for="Attended" /> @Html.DisplayNameFor(model => model.Attended)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
}
|
||||
40
ThAmCo.Events/Views/GuestBookings/Delete.cshtml
Normal file
40
ThAmCo.Events/Views/GuestBookings/Delete.cshtml
Normal file
@@ -0,0 +1,40 @@
|
||||
@model ThAmCo.Events.Data.GuestBooking
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>GuestBooking</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Customer)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Customer.Email)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Event)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Event.Title)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Attended)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Attended)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="CustomerId" />
|
||||
<input type="hidden" asp-for="EventId" />
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</form>
|
||||
</div>
|
||||
36
ThAmCo.Events/Views/GuestBookings/Details.cshtml
Normal file
36
ThAmCo.Events/Views/GuestBookings/Details.cshtml
Normal file
@@ -0,0 +1,36 @@
|
||||
@model ThAmCo.Events.Data.GuestBooking
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>GuestBooking</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Customer)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Customer.Email)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Event)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Event.Title)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Attended)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Attended)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
37
ThAmCo.Events/Views/GuestBookings/Edit.cshtml
Normal file
37
ThAmCo.Events/Views/GuestBookings/Edit.cshtml
Normal file
@@ -0,0 +1,37 @@
|
||||
@model ThAmCo.Events.Data.GuestBooking
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<h4>GuestBooking</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="CustomerId" />
|
||||
<input type="hidden" asp-for="EventId" />
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input asp-for="Attended" /> @Html.DisplayNameFor(model => model.Attended)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
}
|
||||
47
ThAmCo.Events/Views/GuestBookings/Index.cshtml
Normal file
47
ThAmCo.Events/Views/GuestBookings/Index.cshtml
Normal file
@@ -0,0 +1,47 @@
|
||||
@model IEnumerable<ThAmCo.Events.Data.GuestBooking>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Customer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Event)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Attended)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Customer.Email)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Event.Title)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Attended)
|
||||
</td>
|
||||
<td>
|
||||
@Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
|
||||
@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
|
||||
@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
7
ThAmCo.Events/Views/Home/About.cshtml
Normal file
7
ThAmCo.Events/Views/Home/About.cshtml
Normal file
@@ -0,0 +1,7 @@
|
||||
@{
|
||||
ViewData["Title"] = "About";
|
||||
}
|
||||
<h2>@ViewData["Title"]</h2>
|
||||
<h3>@ViewData["Message"]</h3>
|
||||
|
||||
<p>Use this area to provide additional information.</p>
|
||||
17
ThAmCo.Events/Views/Home/Contact.cshtml
Normal file
17
ThAmCo.Events/Views/Home/Contact.cshtml
Normal file
@@ -0,0 +1,17 @@
|
||||
@{
|
||||
ViewData["Title"] = "Contact";
|
||||
}
|
||||
<h2>@ViewData["Title"]</h2>
|
||||
<h3>@ViewData["Message"]</h3>
|
||||
|
||||
<address>
|
||||
One Microsoft Way<br />
|
||||
Redmond, WA 98052-6399<br />
|
||||
<abbr title="Phone">P:</abbr>
|
||||
425.555.0100
|
||||
</address>
|
||||
|
||||
<address>
|
||||
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
|
||||
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
|
||||
</address>
|
||||
5
ThAmCo.Events/Views/Home/Index.cshtml
Normal file
5
ThAmCo.Events/Views/Home/Index.cshtml
Normal file
@@ -0,0 +1,5 @@
|
||||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
}
|
||||
|
||||
<h1>ThAmCo Web Apps Home Page.</h1>
|
||||
6
ThAmCo.Events/Views/Home/Privacy.cshtml
Normal file
6
ThAmCo.Events/Views/Home/Privacy.cshtml
Normal file
@@ -0,0 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "Privacy Policy";
|
||||
}
|
||||
<h2>@ViewData["Title"]</h2>
|
||||
|
||||
<p>Use this page to detail your site's privacy policy.</p>
|
||||
22
ThAmCo.Events/Views/Shared/Error.cshtml
Normal file
22
ThAmCo.Events/Views/Shared/Error.cshtml
Normal file
@@ -0,0 +1,22 @@
|
||||
@model ErrorViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@if (Model.ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@Model.RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>Development environment should not be enabled in deployed applications</strong>, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>, and restarting the application.
|
||||
</p>
|
||||
41
ThAmCo.Events/Views/Shared/_CookieConsentPartial.cshtml
Normal file
41
ThAmCo.Events/Views/Shared/_CookieConsentPartial.cshtml
Normal file
@@ -0,0 +1,41 @@
|
||||
@using Microsoft.AspNetCore.Http.Features
|
||||
|
||||
@{
|
||||
var consentFeature = Context.Features.Get<ITrackingConsentFeature>();
|
||||
var showBanner = !consentFeature?.CanTrack ?? false;
|
||||
var cookieString = consentFeature?.CreateConsentCookie();
|
||||
}
|
||||
|
||||
@if (showBanner)
|
||||
{
|
||||
<nav id="cookieConsent" class="navbar navbar-default navbar-fixed-top" role="alert">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#cookieConsent .navbar-collapse">
|
||||
<span class="sr-only">Toggle cookie consent banner</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></span>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<p class="navbar-text">
|
||||
Use this space to summarize your privacy and cookie use policy.
|
||||
</p>
|
||||
<div class="navbar-right">
|
||||
<a asp-controller="Home" asp-action="Privacy" class="btn btn-info navbar-btn">Learn More</a>
|
||||
<button type="button" class="btn btn-default navbar-btn" data-cookie-string="@cookieString">Accept</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<script>
|
||||
(function () {
|
||||
document.querySelector("#cookieConsent button[data-cookie-string]").addEventListener("click", function (el) {
|
||||
document.cookie = el.target.dataset.cookieString;
|
||||
document.querySelector("#cookieConsent").classList.add("hidden");
|
||||
}, false);
|
||||
})();
|
||||
</script>
|
||||
}
|
||||
75
ThAmCo.Events/Views/Shared/_Layout.cshtml
Normal file
75
ThAmCo.Events/Views/Shared/_Layout.cshtml
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - ThAmCo.Events</title>
|
||||
|
||||
<environment include="Development">
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" />
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
|
||||
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
|
||||
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
|
||||
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
|
||||
</environment>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">ThAmCo Web Application</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a asp-area="" asp-controller="Customers" asp-action="Index">Customers</a></li>
|
||||
<li><a asp-area="" asp-controller="Events" asp-action="Index">Events</a></li>
|
||||
<li><a asp-area="" asp-controller="Staff" asp-action="Index">Staff</a></li>
|
||||
<li><a asp-are"" asp-controller="Food" asp-action="Index">Food</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<partial name="_CookieConsentPartial" />
|
||||
|
||||
<div class="container body-content">
|
||||
@RenderBody()
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2018 - ThAmCo.Events</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<environment include="Development">
|
||||
<script src="~/lib/jquery/dist/jquery.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js"
|
||||
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
|
||||
asp-fallback-test="window.jQuery"
|
||||
crossorigin="anonymous"
|
||||
integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT">
|
||||
</script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"
|
||||
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
|
||||
crossorigin="anonymous"
|
||||
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa">
|
||||
</script>
|
||||
<script src="~/js/site.min.js" asp-append-version="true"></script>
|
||||
</environment>
|
||||
|
||||
@RenderSection("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
18
ThAmCo.Events/Views/Shared/_ValidationScriptsPartial.cshtml
Normal file
18
ThAmCo.Events/Views/Shared/_ValidationScriptsPartial.cshtml
Normal file
@@ -0,0 +1,18 @@
|
||||
<environment include="Development">
|
||||
<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.17.0/jquery.validate.min.js"
|
||||
asp-fallback-src="~/lib/jquery-validation/dist/jquery.validate.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.validator"
|
||||
crossorigin="anonymous"
|
||||
integrity="sha384-rZfj/ogBloos6wzLGpPkkOr/gpkBNLZ6b6yLy4o+ok+t/SAKlL5mvXLr0OXNi1Hp">
|
||||
</script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validation.unobtrusive/3.2.9/jquery.validate.unobtrusive.min.js"
|
||||
asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive"
|
||||
crossorigin="anonymous"
|
||||
integrity="sha384-ifv0TYDWxBHzvAk2Z0n8R434FL1Rlv/Av18DXE43N/1rvHyOG4izKst0f2iSLdds">
|
||||
</script>
|
||||
</environment>
|
||||
50
ThAmCo.Events/Views/Staff/Create.cshtml
Normal file
50
ThAmCo.Events/Views/Staff/Create.cshtml
Normal file
@@ -0,0 +1,50 @@
|
||||
@model ThAmCo.Events.Data.Staff
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<h4>Staff</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Surname" class="control-label"></label>
|
||||
<input asp-for="Surname" class="form-control" />
|
||||
<span asp-validation-for="Surname" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="FirstName" class="control-label"></label>
|
||||
<input asp-for="FirstName" class="form-control" />
|
||||
<span asp-validation-for="FirstName" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="control-label"></label>
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input asp-for="FirstAid" /> @Html.DisplayNameFor(model => model.FirstAid)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
}
|
||||
45
ThAmCo.Events/Views/Staff/Delete.cshtml
Normal file
45
ThAmCo.Events/Views/Staff/Delete.cshtml
Normal file
@@ -0,0 +1,45 @@
|
||||
@model ThAmCo.Events.Data.Staff
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Staff</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Surname)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Surname)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FirstName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FirstName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Email)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Email)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FirstAid)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FirstAid)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</form>
|
||||
</div>
|
||||
81
ThAmCo.Events/Views/Staff/Details.cshtml
Normal file
81
ThAmCo.Events/Views/Staff/Details.cshtml
Normal file
@@ -0,0 +1,81 @@
|
||||
@model ThAmCo.Events.Data.Staff
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>Staff</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Surname)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Surname)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FirstName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FirstName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Email)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Email)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FirstAid)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FirstAid)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Staffings.FirstOrDefault().Event.Title)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Staffings.FirstOrDefault().Event.Date)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Staffings.FirstOrDefault().Event.Duration)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Staffings.FirstOrDefault().Event.TypeId)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.Staffings)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Event.Title)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Event.Date)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Event.Duration)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Event.TypeId)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
51
ThAmCo.Events/Views/Staff/Edit.cshtml
Normal file
51
ThAmCo.Events/Views/Staff/Edit.cshtml
Normal file
@@ -0,0 +1,51 @@
|
||||
@model ThAmCo.Events.Data.Staff
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<h4>Staff</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Surname" class="control-label"></label>
|
||||
<input asp-for="Surname" class="form-control" />
|
||||
<span asp-validation-for="Surname" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="FirstName" class="control-label"></label>
|
||||
<input asp-for="FirstName" class="form-control" />
|
||||
<span asp-validation-for="FirstName" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="control-label"></label>
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input asp-for="FirstAid" /> @Html.DisplayNameFor(model => model.FirstAid)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||
}
|
||||
53
ThAmCo.Events/Views/Staff/Index.cshtml
Normal file
53
ThAmCo.Events/Views/Staff/Index.cshtml
Normal file
@@ -0,0 +1,53 @@
|
||||
@model IEnumerable<ThAmCo.Events.Data.Staff>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Surname)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FirstName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Email)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FirstAid)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
<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>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
3
ThAmCo.Events/Views/_ViewImports.cshtml
Normal file
3
ThAmCo.Events/Views/_ViewImports.cshtml
Normal file
@@ -0,0 +1,3 @@
|
||||
@using ThAmCo.Events
|
||||
@using ThAmCo.Events.Models
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
3
ThAmCo.Events/Views/_ViewStart.cshtml
Normal file
3
ThAmCo.Events/Views/_ViewStart.cshtml
Normal file
@@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
Reference in New Issue
Block a user