From c96b2e56cb0904407dcf8158b0c1d905e76b41ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=B0=D0=BB=D0=B8=D0=BD=D0=B0=20=D0=A4=D0=B5=D0=B4?= =?UTF-8?q?=D0=BE=D1=80=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Mon, 22 Apr 2024 17:59:57 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B2=D1=80=D0=BE=D0=B4=D0=B5=20=D0=BA=D0=B0?= =?UTF-8?q?=D0=BA=20=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=B0=D1=8F=205=20?= =?UTF-8?q?=D0=BB=D0=B0=D0=B1=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CarpentryWorkshop/CarpentryWorkshop/FormMain.cs | 1 + .../CarpentryWorkshopClientApp/APIClient.cs | 3 +-- .../BindingModels/OrderBindingModel.cs | 1 + .../CarpentryWorkshopDatabaseModelSnapshot.cs | 10 +++++----- .../CarpentryWorkshopDatabaseImplement/Models/Order.cs | 1 + .../CarpentryWorkshopRestApi.csproj | 4 ++++ .../CarpentryWorkshopRestApi/log4net.config | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CarpentryWorkshop/CarpentryWorkshop/FormMain.cs b/CarpentryWorkshop/CarpentryWorkshop/FormMain.cs index 42d7a83..5cdf9ef 100644 --- a/CarpentryWorkshop/CarpentryWorkshop/FormMain.cs +++ b/CarpentryWorkshop/CarpentryWorkshop/FormMain.cs @@ -87,6 +87,7 @@ namespace CarpentryWorkshopView { Id = id, WoodId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["WoodId"].Value), + ClientId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["ClientId"].Value), Status = Enum.Parse(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()), Count = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Count"].Value), Sum = double.Parse(dataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()), diff --git a/CarpentryWorkshop/CarpentryWorkshopClientApp/APIClient.cs b/CarpentryWorkshop/CarpentryWorkshopClientApp/APIClient.cs index a6001cd..c83d02d 100644 --- a/CarpentryWorkshop/CarpentryWorkshopClientApp/APIClient.cs +++ b/CarpentryWorkshop/CarpentryWorkshopClientApp/APIClient.cs @@ -13,8 +13,7 @@ namespace CarpentryWorkshopClientApp { _client.BaseAddress = new Uri(configuration["IPAddress"]); _client.DefaultRequestHeaders.Accept.Clear(); - _client.DefaultRequestHeaders.Accept.Add(new - MediaTypeWithQualityHeaderValue("application/json")); + _client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); } public static T? GetRequest(string requestUrl) { diff --git a/CarpentryWorkshop/CarpentryWorkshopContracts/BindingModels/OrderBindingModel.cs b/CarpentryWorkshop/CarpentryWorkshopContracts/BindingModels/OrderBindingModel.cs index 1e8a96a..9028d5d 100644 --- a/CarpentryWorkshop/CarpentryWorkshopContracts/BindingModels/OrderBindingModel.cs +++ b/CarpentryWorkshop/CarpentryWorkshopContracts/BindingModels/OrderBindingModel.cs @@ -8,6 +8,7 @@ namespace CarpentryWorkshopContracts.BindingModels public int Id { get; set; } public int WoodId { get; set; } public int ClientId { get; set; } + public string ClientFIO { get; set; } = string.Empty; public int Count { get; set; } public double Sum { get; set; } public OrderStatus Status { get; set; } = OrderStatus.Неизвестен; diff --git a/CarpentryWorkshop/CarpentryWorkshopDatabaseImplement/Migrations/CarpentryWorkshopDatabaseModelSnapshot.cs b/CarpentryWorkshop/CarpentryWorkshopDatabaseImplement/Migrations/CarpentryWorkshopDatabaseModelSnapshot.cs index dae0eab..f285b97 100644 --- a/CarpentryWorkshop/CarpentryWorkshopDatabaseImplement/Migrations/CarpentryWorkshopDatabaseModelSnapshot.cs +++ b/CarpentryWorkshop/CarpentryWorkshopDatabaseImplement/Migrations/CarpentryWorkshopDatabaseModelSnapshot.cs @@ -44,7 +44,7 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations b.HasKey("Id"); - b.ToTable("Clients"); + b.ToTable("Clients", (string)null); }); modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Component", b => @@ -64,7 +64,7 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations b.HasKey("Id"); - b.ToTable("Components"); + b.ToTable("Components", (string)null); }); modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Order", b => @@ -102,7 +102,7 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations b.HasIndex("WoodId"); - b.ToTable("Orders"); + b.ToTable("Orders", (string)null); }); modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Wood", b => @@ -122,7 +122,7 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations b.HasKey("Id"); - b.ToTable("Woods"); + b.ToTable("Woods", (string)null); }); modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.WoodComponent", b => @@ -148,7 +148,7 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations b.HasIndex("WoodId"); - b.ToTable("WoodComponents"); + b.ToTable("WoodComponents", (string)null); }); modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Order", b => diff --git a/CarpentryWorkshop/CarpentryWorkshopDatabaseImplement/Models/Order.cs b/CarpentryWorkshop/CarpentryWorkshopDatabaseImplement/Models/Order.cs index 4fc9262..462d76e 100644 --- a/CarpentryWorkshop/CarpentryWorkshopDatabaseImplement/Models/Order.cs +++ b/CarpentryWorkshop/CarpentryWorkshopDatabaseImplement/Models/Order.cs @@ -59,6 +59,7 @@ namespace CarpentryWorkshopDatabaseImplement.Models { WoodId = WoodId, ClientId = ClientId, + ClientFIO = Client.ClientFIO, Count = Count, Sum = Sum, DateCreate = DateCreate, diff --git a/CarpentryWorkshop/CarpentryWorkshopRestApi/CarpentryWorkshopRestApi.csproj b/CarpentryWorkshop/CarpentryWorkshopRestApi/CarpentryWorkshopRestApi.csproj index 1dd3a99..f2b88ce 100644 --- a/CarpentryWorkshop/CarpentryWorkshopRestApi/CarpentryWorkshopRestApi.csproj +++ b/CarpentryWorkshop/CarpentryWorkshopRestApi/CarpentryWorkshopRestApi.csproj @@ -7,6 +7,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/CarpentryWorkshop/CarpentryWorkshopRestApi/log4net.config b/CarpentryWorkshop/CarpentryWorkshopRestApi/log4net.config index 0495745..4e8a817 100644 --- a/CarpentryWorkshop/CarpentryWorkshopRestApi/log4net.config +++ b/CarpentryWorkshop/CarpentryWorkshopRestApi/log4net.config @@ -1,7 +1,7 @@  - +