From 7b682adb008353f37e4182ccdbcb00c233aab471 Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Sun, 19 Mar 2023 13:22:53 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B6=D0=B5=20=D0=BF=D0=BE=D1=87=D1=82?= =?UTF-8?q?=D0=B8=20=D0=B2=D1=81=D1=91=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0=D0=B5=D1=82.=20=D0=9D=D0=BE=20=D1=8D=D1=82=D0=BE=D1=82?= =?UTF-8?q?=20=D0=BE=D1=82=D1=87=D1=91=D1=82=20=D0=BD=D0=B0=20=D1=84=D0=BE?= =?UTF-8?q?=D1=80=D0=BC=D0=B5...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs | 3 ++- .../BlacksmithWorkshop/FormReportManufactureWorkPieces.cs | 6 +++--- .../BlacksmithWorkshopDatabaseImplement/Models/Order.cs | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs index 64825f7..95d8437 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs @@ -49,6 +49,7 @@ namespace BlacksmithWorkshop { dataGridView.DataSource = list; dataGridView.Columns["ManufactureId"].Visible = false; + dataGridView.Columns["ManufactureName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; } _logger.LogInformation("Загрузка заказов"); @@ -187,7 +188,7 @@ namespace BlacksmithWorkshop if (dialog.ShowDialog() == DialogResult.OK) { - _reportLogic.SaveWorkPiecesToWordFile(new ReportBindingModel + _reportLogic.SaveManufacturesToWordFile(new ReportBindingModel { FileName = dialog.FileName }); diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureWorkPieces.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureWorkPieces.cs index 598437d..0001b09 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureWorkPieces.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportManufactureWorkPieces.cs @@ -41,7 +41,7 @@ namespace BlacksmithWorkshop { dataGridView.Rows.Add(new object[] { elem.ManufactureName, "", "" }); - foreach (var listElem in elem.Manufactures) + foreach (var listElem in elem.WorkPieces) { dataGridView.Rows.Add(new object[] { "", listElem.Item1, listElem.Item2 }); } @@ -51,11 +51,11 @@ namespace BlacksmithWorkshop } } - _logger.LogInformation("Загрузка списка изделий по компонентам"); + _logger.LogInformation("Загрузка списка изделий по заготовкам"); } catch (Exception ex) { - _logger.LogError(ex, "Ошибка загрузки списка изделий по компонентам"); + _logger.LogError(ex, "Ошибка загрузки списка изделий по заготовкам"); MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } diff --git a/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/Models/Order.cs b/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/Models/Order.cs index dd91c74..057a64c 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/Models/Order.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/Models/Order.cs @@ -68,7 +68,8 @@ namespace BlacksmithWorkshopDatabaseImplement.Models Sum = Sum, Status = Status, DateCreate = DateCreate, - DateImplement = DateImplement + DateImplement = DateImplement, + ManufactureName = Manufacture.ManufactureName }; } }