From 040e6f94fcbabb024c6b6692b29e7d2864e7d85f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C=20=D0=93=D0=BE=D1=80=D0=B4?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2?= <89176335310x@gmail.com> Date: Sat, 1 Jun 2024 03:39:57 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BA=D1=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/HomeController.cs | 25 +------------ .../Views/Home/Payment.cshtml | 35 ++++++++++++++++--- .../Views/Home/PaymentProduct.cshtml | 26 -------------- 3 files changed, 31 insertions(+), 55 deletions(-) delete mode 100644 ElectronicsShop/ElectronicsShopShopClientApp/Views/Home/PaymentProduct.cshtml diff --git a/ElectronicsShop/ElectronicsShopShopClientApp/Controllers/HomeController.cs b/ElectronicsShop/ElectronicsShopShopClientApp/Controllers/HomeController.cs index 645b955..0aae1c9 100644 --- a/ElectronicsShop/ElectronicsShopShopClientApp/Controllers/HomeController.cs +++ b/ElectronicsShop/ElectronicsShopShopClientApp/Controllers/HomeController.cs @@ -256,29 +256,6 @@ namespace ElectronicsShopUserApp.Controllers { (int, Dictionary) tuple = (id, _productList); return View(tuple); } - [HttpGet] - public IActionResult PaymentProduct(int id) - { - if (APIClient.Client == null) - { - return Redirect("~/Home/Enter"); - } - - if (id == 0) - { - return Redirect("Orders"); - } - var products = APIClient.GetRequset>>($"api/main/getorderproducts?_orderid={id}"); - - foreach (var pr in products) - { - var product = JsonConvert.DeserializeObject(pr[0]); - int count = JsonConvert.DeserializeObject(pr[1]); - _productList.Add(product.ID, (product, count)); - } - - (int, Dictionary) tuple = (id, _productList); - return View(tuple); - } + } } diff --git a/ElectronicsShop/ElectronicsShopShopClientApp/Views/Home/Payment.cshtml b/ElectronicsShop/ElectronicsShopShopClientApp/Views/Home/Payment.cshtml index 88b9e1d..625e2c6 100644 --- a/ElectronicsShop/ElectronicsShopShopClientApp/Views/Home/Payment.cshtml +++ b/ElectronicsShop/ElectronicsShopShopClientApp/Views/Home/Payment.cshtml @@ -16,6 +16,14 @@
+
+
Сумма платежа:
+
+ + +
+
+
@@ -54,14 +62,11 @@ @Html.DisplayFor(modelItem => item.Value.Item1.Price) - - - Оплатить - } +
@@ -69,4 +74,24 @@
- \ No newline at end of file + + + + \ No newline at end of file diff --git a/ElectronicsShop/ElectronicsShopShopClientApp/Views/Home/PaymentProduct.cshtml b/ElectronicsShop/ElectronicsShopShopClientApp/Views/Home/PaymentProduct.cshtml deleted file mode 100644 index 75877f4..0000000 --- a/ElectronicsShop/ElectronicsShopShopClientApp/Views/Home/PaymentProduct.cshtml +++ /dev/null @@ -1,26 +0,0 @@ -@{ - ViewData["Title"] = "AddProduct"; -} -
-

Оплата продукта

-
-
-
-
Продукты:
-
- -
-
-
-
Сумма:
-
- -
-
-
-
-
- -
-
-