This commit is contained in:
Игорь Гордеев 2024-06-01 02:50:19 +04:00
commit 216356dd73
4 changed files with 7 additions and 1 deletions

View File

@ -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);
}

View File

@ -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) {

View File

@ -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>

View File

@ -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>