This commit is contained in:
Paul Schneider 2017-02-13 01:32:03 +01:00
commit cea0defaf4
16 changed files with 309 additions and 38 deletions

View file

@ -18,6 +18,12 @@
<span asp-validation-for="Brand" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ColorId" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="ColorId" asp-items=@ViewBag.ColorId class="form-control"></select>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" />

View file

@ -19,6 +19,13 @@
<span asp-validation-for="Brand" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ColorId" class="control-label col-md-2">ColorId</label>
<div class="col-md-10">
<select asp-for="ColorId" asp-items=@ViewBag.ColorId class="form-control"></select>
<span asp-validation-for="ColorId" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />

View file

@ -14,6 +14,9 @@
<th>
@Html.DisplayNameFor(model => model.Brand)
</th>
<th>
@Html.DisplayNameFor(model => model.Color)
</th>
<th></th>
</tr>
@ -22,6 +25,9 @@
<td>
@Html.DisplayFor(modelItem => item.Brand)
</td>
<td>
@Html.DisplayFor(modelItem => item.Color)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |