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 }; } }