Product Edit/Del is done
This commit is contained in:
parent
688f3c40b0
commit
49b9a58b2e
@ -12,7 +12,7 @@ namespace ElectronicsShopDataBaseImplement
|
||||
optionsBuilder)
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false) {
|
||||
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-E2VPEN3\SQLEXPRESS;Initial Catalog=ElectronicsShopDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-O0N00SH\SQLEXPRESS;Initial Catalog=ElectronicsShopDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
@ -134,6 +134,9 @@ namespace ElectronicsShopUserApp.Controllers {
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
|
||||
if (id == 0) {
|
||||
return Redirect("Orders");
|
||||
}
|
||||
var products = APIClient.GetRequset<List<List<string>>>($"api/main/getorderproducts?_orderid={id}");
|
||||
|
||||
foreach (var pr in products) {
|
||||
|
@ -76,6 +76,7 @@
|
||||
<div class="col-4"></div>
|
||||
<div class="col-8">
|
||||
<input type="submit" value="Заказ готова, вернуться!" class="btn btn-primary" />
|
||||
<a class="btn btn-primary btn-sm" asp-action="DeleteOrder" asp-route-ID="@Model.Item1">Удалить</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -70,12 +70,14 @@
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-8">
|
||||
<input type="submit" value="Заказ готова, вернуться!" class="btn btn-primary" />
|
||||
<a class="btn btn-primary btn-sm" asp-action="DeleteOrder" asp-route-ID="@Model.Item1">Отменить создание корзины</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user