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

49 lines
1.3 KiB
Plaintext
Raw Normal View History

2020-06-07 21:36:12 +00:00
@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>