Upload project.
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user