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