{User_id,Price_total} in Order {controller,views}
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2021-02-10 11:38:55 +01:00
parent 649cf813ba
commit 9bed70352e
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
6 changed files with 53 additions and 2 deletions

View File

@ -55,7 +55,7 @@ namespace pwt_0x01_ng.Areas.Admin.Controllers
// more details, see http://go.microsoft.com/fwlink/?LinkId=317598. // more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("Order_Number,id,Created,Updated")] Order order) public async Task<IActionResult> Create([Bind("Order_Number,id,User_id,Price_total,Created,Updated")] Order order)
{ {
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
@ -88,7 +88,7 @@ namespace pwt_0x01_ng.Areas.Admin.Controllers
// more details, see http://go.microsoft.com/fwlink/?LinkId=317598. // more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(int id, [Bind("Order_Number,id,new.Created,new.Updated")] Order order) public async Task<IActionResult> Edit(int id, [Bind("Order_Number,id,User_id,Price_total,new.Created,new.Updated")] Order order)
{ {
if (id != order.id) if (id != order.id)
{ {

View File

@ -17,6 +17,11 @@
<input asp-for="Order_Number" class="form-control" /> <input asp-for="Order_Number" class="form-control" />
<span asp-validation-for="Order_Number" class="text-danger"></span> <span asp-validation-for="Order_Number" class="text-danger"></span>
</div> </div>
<div class="form-group">
<label asp-for="User_id" class="control-label"></label>
<input asp-for="User_id" class="form-control" />
<span asp-validation-for="User_id" class="text-danger"></span>
</div>
<div class="form-group"> <div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" /> <input type="submit" value="Create" class="btn btn-primary" />
</div> </div>

View File

@ -17,6 +17,18 @@
<dd class = "col-sm-10"> <dd class = "col-sm-10">
@Html.DisplayFor(model => model.Order_Number) @Html.DisplayFor(model => model.Order_Number)
</dd> </dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.User_id)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.User_id)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Price_total)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Price_total)
</dd>
<dt class = "col-sm-2"> <dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Created) @Html.DisplayNameFor(model => model.Created)
</dt> </dt>

View File

@ -16,6 +16,18 @@
<dd class = "col-sm-10"> <dd class = "col-sm-10">
@Html.DisplayFor(model => model.Order_Number) @Html.DisplayFor(model => model.Order_Number)
</dd> </dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.User_id)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.User_id)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Price_total)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Price_total)
</dd>
<dt class = "col-sm-2"> <dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Created) @Html.DisplayNameFor(model => model.Created)
</dt> </dt>

View File

@ -17,6 +17,16 @@
<input asp-for="Order_Number" class="form-control" /> <input asp-for="Order_Number" class="form-control" />
<span asp-validation-for="Order_Number" class="text-danger"></span> <span asp-validation-for="Order_Number" class="text-danger"></span>
</div> </div>
<div class="form-group">
<label asp-for="User_id" class="control-label"></label>
<input asp-for="User_id" class="form-control" />
<span asp-validation-for="User_id" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Price_total" class="control-label"></label>
<input asp-for="Price_total" class="form-control" />
<span asp-validation-for="Price_total" class="text-danger"></span>
</div>
<input type="hidden" asp-for="id" /> <input type="hidden" asp-for="id" />
<div class="form-group"> <div class="form-group">
<input type="submit" value="Save" class="btn btn-primary" /> <input type="submit" value="Save" class="btn btn-primary" />

View File

@ -14,6 +14,12 @@
<th> <th>
@Html.DisplayNameFor(model => model.Order_Number) @Html.DisplayNameFor(model => model.Order_Number)
</th> </th>
<th>
@Html.DisplayNameFor(model => model.User_id)
</th>
<th>
@Html.DisplayNameFor(model => model.Price_total)
</th>
<th> <th>
@Html.DisplayNameFor(model => model.Created) @Html.DisplayNameFor(model => model.Created)
</th> </th>
@ -29,6 +35,12 @@
<td> <td>
@Html.DisplayFor(modelItem => item.Order_Number) @Html.DisplayFor(modelItem => item.Order_Number)
</td> </td>
<td>
@Html.DisplayFor(modelItem => item.User_id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Price_total)
</td>
<td> <td>
@Html.DisplayFor(modelItem => item.Created) @Html.DisplayFor(modelItem => item.Created)
</td> </td>