diff --git a/SecuritySystem/SecuritySystemBusinessLogic/BusinessLogics/ReportLogic.cs b/SecuritySystem/SecuritySystemBusinessLogic/BusinessLogics/ReportLogic.cs index 68b65ec..51ec67b 100644 --- a/SecuritySystem/SecuritySystemBusinessLogic/BusinessLogics/ReportLogic.cs +++ b/SecuritySystem/SecuritySystemBusinessLogic/BusinessLogics/ReportLogic.cs @@ -79,13 +79,13 @@ namespace SecuritySystemBusinessLogic.BusinessLogics /// Сохранение компонент в файл-Word /// /// - public void SaveComponentsToWordFile(ReportBindingModel model) + public void SaveSecuresToWordFile(ReportBindingModel model) { _saveToWord.CreateDoc(new WordInfo { FileName = model.FileName, - Title = "Список компонент", - Components = _componentStorage.GetFullList() + Title = "Список изделий", + Secures = _secureStorage.GetFullList() }); } /// diff --git a/SecuritySystem/SecuritySystemBusinessLogic/OfficePackage/AbstractSaveToWord.cs b/SecuritySystem/SecuritySystemBusinessLogic/OfficePackage/AbstractSaveToWord.cs index 51279f1..39b624e 100644 --- a/SecuritySystem/SecuritySystemBusinessLogic/OfficePackage/AbstractSaveToWord.cs +++ b/SecuritySystem/SecuritySystemBusinessLogic/OfficePackage/AbstractSaveToWord.cs @@ -17,11 +17,14 @@ namespace SecuritySystemBusinessLogic.OfficePackage JustificationType = WordJustificationType.Center } }); - foreach (var component in info.Components) + foreach (var secure in info.Secures) { CreateParagraph(new WordParagraph { - Texts = new List<(string, WordTextProperties)> { (component.ComponentName, new WordTextProperties { Size = "24", }) }, + Texts = new List<(string, WordTextProperties)> { + (secure.SecureName, new WordTextProperties { Bold = true, Size = "24", }), + ("\t" + secure.Price.ToString() + " руб.", new WordTextProperties { Size = "24", }) + }, TextProperties = new WordTextProperties { Size = "24", diff --git a/SecuritySystem/SecuritySystemBusinessLogic/OfficePackage/HelperModels/WordInfo.cs b/SecuritySystem/SecuritySystemBusinessLogic/OfficePackage/HelperModels/WordInfo.cs index 029c1cd..05c8ce6 100644 --- a/SecuritySystem/SecuritySystemBusinessLogic/OfficePackage/HelperModels/WordInfo.cs +++ b/SecuritySystem/SecuritySystemBusinessLogic/OfficePackage/HelperModels/WordInfo.cs @@ -6,6 +6,6 @@ namespace SecuritySystemBusinessLogic.OfficePackage.HelperModels { public string FileName { get; set; } = string.Empty; public string Title { get; set; } = string.Empty; - public List Components { get; set; } = new(); + public List Secures { get; set; } = new(); } } diff --git a/SecuritySystem/SecuritySystemContracts/BusinessLogicsContracts/IReportLogic.cs b/SecuritySystem/SecuritySystemContracts/BusinessLogicsContracts/IReportLogic.cs index 4413448..36fce98 100644 --- a/SecuritySystem/SecuritySystemContracts/BusinessLogicsContracts/IReportLogic.cs +++ b/SecuritySystem/SecuritySystemContracts/BusinessLogicsContracts/IReportLogic.cs @@ -20,7 +20,7 @@ namespace SecuritySystemContracts.BusinessLogicsContracts /// Сохранение компонент в файл-Word /// /// - void SaveComponentsToWordFile(ReportBindingModel model); + void SaveSecuresToWordFile(ReportBindingModel model); /// /// Сохранение компонент с указаеним продуктов в файл-Excel /// diff --git a/SecuritySystem/SecuritySystemView/FormMain.Designer.cs b/SecuritySystem/SecuritySystemView/FormMain.Designer.cs index f7557b2..8388aca 100644 --- a/SecuritySystem/SecuritySystemView/FormMain.Designer.cs +++ b/SecuritySystem/SecuritySystemView/FormMain.Designer.cs @@ -88,8 +88,8 @@ // списокКомпонентовToolStripMenuItem.Name = "списокКомпонентовToolStripMenuItem"; списокКомпонентовToolStripMenuItem.Size = new Size(276, 26); - списокКомпонентовToolStripMenuItem.Text = "Список компонентов"; - списокКомпонентовToolStripMenuItem.Click += ReportComponentsToolStripMenuItem_Click; + списокКомпонентовToolStripMenuItem.Text = "Список изделий"; + списокКомпонентовToolStripMenuItem.Click += ReportSecuresToolStripMenuItem_Click; // // компонентыПоИзделиямToolStripMenuItem // diff --git a/SecuritySystem/SecuritySystemView/FormMain.cs b/SecuritySystem/SecuritySystemView/FormMain.cs index db1d737..a9b220c 100644 --- a/SecuritySystem/SecuritySystemView/FormMain.cs +++ b/SecuritySystem/SecuritySystemView/FormMain.cs @@ -140,12 +140,12 @@ namespace SecuritySystemView LoadData(); } - private void ReportComponentsToolStripMenuItem_Click(object sender, EventArgs e) + private void ReportSecuresToolStripMenuItem_Click(object sender, EventArgs e) { using var dialog = new SaveFileDialog { Filter = "docx|*.docx" }; if (dialog.ShowDialog() == DialogResult.OK) { - _reportLogic.SaveComponentsToWordFile(new ReportBindingModel + _reportLogic.SaveSecuresToWordFile(new ReportBindingModel { FileName = dialog.FileName });