CarsController
This commit is contained in:
@@ -4,9 +4,7 @@
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h1>Create</h1>
|
||||
|
||||
<h4>Create new car</h4>
|
||||
<h1>Create new vehicle</h1>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
@@ -29,13 +27,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="CountPassengerSeats" class="control-label"></label>
|
||||
<select asp-for="CountPassengerSeats" class="form-control">
|
||||
<option> 3 </option>
|
||||
<option> 4 </option>
|
||||
<option> 5 </option>
|
||||
<option> 6 </option>
|
||||
<option> 7 </option>
|
||||
</select>
|
||||
<input asp-for="CountPassengerSeats" class="form-control" />
|
||||
<span asp-validation-for="CountPassengerSeats" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
ViewData["Title"] = "Cars";
|
||||
}
|
||||
|
||||
<h1>Index</h1>
|
||||
<h1>Vehicle</h1>
|
||||
<p>
|
||||
@if (this.User.IsInRole("Admin"))
|
||||
{
|
||||
<a asp-action="Create">New car</a>
|
||||
<a asp-action="Create">Create car</a>
|
||||
}
|
||||
</p>
|
||||
<table class="table">
|
||||
@@ -38,30 +38,33 @@
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Brand)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Model)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Year)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CountPassengerSeats)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Description)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.PriceForDay)
|
||||
</td>
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Brand)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Model)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Year)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CountPassengerSeats)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Description)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.PriceForDay)
|
||||
</td>
|
||||
@if (this.User.IsInRole("Admin"))
|
||||
{
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user