From 427350b7cfd7042edc65377e208f39855b35ce9c Mon Sep 17 00:00:00 2001 From: DyCTaTOR <125912249+DyCTaTOR@users.noreply.github.com> Date: Sun, 21 Apr 2024 13:02:39 +0400 Subject: [PATCH] =?UTF-8?q?=D0=93=D0=BE=D1=82=D0=BE=D0=B2=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=BB=D0=B0=D0=B15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PlumbingRepair/PlumbingRepairClientApp/APIClient.cs | 2 +- .../PlumbingRepairClientApp/Controllers/HomeController.cs | 2 +- .../PlumbingRepairClientApp/Views/Home/Create.cshtml | 2 +- PlumbingRepair/PlumbingRepairDataBaseImplement/Models/Order.cs | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/PlumbingRepair/PlumbingRepairClientApp/APIClient.cs b/PlumbingRepair/PlumbingRepairClientApp/APIClient.cs index b87a4f6..e378cea 100644 --- a/PlumbingRepair/PlumbingRepairClientApp/APIClient.cs +++ b/PlumbingRepair/PlumbingRepairClientApp/APIClient.cs @@ -34,7 +34,7 @@ namespace PlumbingRepairClientApp var data = new StringContent(json, Encoding.UTF8, "application/json"); var response = _client.PostAsync(requestUrl, data); - + var result = response.Result.Content.ReadAsStringAsync().Result; if (!response.Result.IsSuccessStatusCode) { diff --git a/PlumbingRepair/PlumbingRepairClientApp/Controllers/HomeController.cs b/PlumbingRepair/PlumbingRepairClientApp/Controllers/HomeController.cs index 8024fc4..379f602 100644 --- a/PlumbingRepair/PlumbingRepairClientApp/Controllers/HomeController.cs +++ b/PlumbingRepair/PlumbingRepairClientApp/Controllers/HomeController.cs @@ -116,7 +116,7 @@ namespace PlumbingRepairClientApp.Controllers { throw new Exception("Количество и сумма должны быть больше 0"); } - APIClient.PostRequest("api/main/createorder", new OrderBindingModel + APIClient.PostRequest("api/main/createorder", new OrderBindingModel { ClientId = APIClient.Client.Id, WorkId = work, diff --git a/PlumbingRepair/PlumbingRepairClientApp/Views/Home/Create.cshtml b/PlumbingRepair/PlumbingRepairClientApp/Views/Home/Create.cshtml index df882dc..08b7508 100644 --- a/PlumbingRepair/PlumbingRepairClientApp/Views/Home/Create.cshtml +++ b/PlumbingRepair/PlumbingRepairClientApp/Views/Home/Create.cshtml @@ -6,7 +6,7 @@
-
Изделие:
+
Работа:
diff --git a/PlumbingRepair/PlumbingRepairDataBaseImplement/Models/Order.cs b/PlumbingRepair/PlumbingRepairDataBaseImplement/Models/Order.cs index 8b4ec0c..8234d1e 100644 --- a/PlumbingRepair/PlumbingRepairDataBaseImplement/Models/Order.cs +++ b/PlumbingRepair/PlumbingRepairDataBaseImplement/Models/Order.cs @@ -73,8 +73,9 @@ namespace PlumbingRepairDataBaseImplement.Models { Id = Id, WorkId = WorkId, - WorkName = WorkName, + WorkName = Work.WorkName, ClientId = ClientId, + ClientFIO = Client.ClientFIO, Count = Count, Sum = Sum, Status = Status,