37 lines
974 B
Plaintext
37 lines
974 B
Plaintext
@model Vidly.ViewModels.CustomersViewModel
|
|
@{
|
|
ViewBag.Title = "Customers";
|
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
|
}
|
|
|
|
<h2>Customers</h2>
|
|
|
|
@*<button type="submit" class="btn btn-primary" onclick="">New Customer</button>*@
|
|
@Html.ActionLink("New Customer", "New", "Customers", null, new { @class = "btn btn-primary" })
|
|
|
|
|
|
@if (Model.Customers.Count == 0)
|
|
{
|
|
<text>No one has rented this movie before.</text>
|
|
}
|
|
else
|
|
{
|
|
<table class="table table-bordered table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Customer</th>
|
|
<th>Membership Type</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var customer in Model.Customers)
|
|
{
|
|
<tr>
|
|
<td>@Html.ActionLink(@customer.Name, "Edit", "Customers", new { id = @customer.Id }, null)</td>
|
|
<td>@customer.MembershipType.Name</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
|
|
} |