diff --git a/Confectionery/ConfectioneryBusinessLogic/AbstractSaveToWord.cs b/Confectionery/ConfectioneryBusinessLogic/AbstractSaveToWord.cs index c1080bd..bdbb056 100644 --- a/Confectionery/ConfectioneryBusinessLogic/AbstractSaveToWord.cs +++ b/Confectionery/ConfectioneryBusinessLogic/AbstractSaveToWord.cs @@ -22,11 +22,11 @@ namespace ConfectioneryBusinessLogic.OfficePackage JustificationType = WordJustificationType.Center } }); - foreach (var component in info.Components) + foreach (var pastry in info.Pastrys) { CreateParagraph(new WordParagraph { - Texts = new List<(string, WordTextProperties)> {(component.ComponentName, new WordTextProperties { Size = "24", }) }, + Texts = new List<(string, WordTextProperties)> {(pastry.PastryName, new WordTextProperties { Size = "24", }) }, TextProperties = new WordTextProperties { Size = "24", diff --git a/Confectionery/ConfectioneryBusinessLogic/ReportLogic.cs b/Confectionery/ConfectioneryBusinessLogic/ReportLogic.cs index 9a55dbf..08e255f 100644 --- a/Confectionery/ConfectioneryBusinessLogic/ReportLogic.cs +++ b/Confectionery/ConfectioneryBusinessLogic/ReportLogic.cs @@ -11,17 +11,15 @@ namespace ConfectioneryBusinessLogic public class ReportLogic : IReportLogic { private readonly IComponentStorage _componentStorage; - private readonly IPastryStorage _productStorage; + private readonly IPastryStorage _pastryStorage; private readonly IOrderStorage _orderStorage; private readonly AbstractSaveToExcel _saveToExcel; private readonly AbstractSaveToWord _saveToWord; private readonly AbstractSaveToPdf _saveToPdf; - public ReportLogic(IPastryStorage productStorage, IComponentStorage - componentStorage, IOrderStorage orderStorage, - AbstractSaveToExcel saveToExcel, AbstractSaveToWord saveToWord, - AbstractSaveToPdf saveToPdf) + public ReportLogic(IPastryStorage pastryStorage, IComponentStorage componentStorage, IOrderStorage orderStorage, AbstractSaveToExcel saveToExcel, + AbstractSaveToWord saveToWord, AbstractSaveToPdf saveToPdf) { - _productStorage = productStorage; + _pastryStorage = pastryStorage; _componentStorage = componentStorage; _orderStorage = orderStorage; _saveToExcel = saveToExcel; @@ -35,7 +33,7 @@ namespace ConfectioneryBusinessLogic public List GetPastryComponent() { var components = _componentStorage.GetFullList(); - var products = _productStorage.GetFullList(); + var products = _pastryStorage.GetFullList(); var list = new List(); foreach (var component in components) { @@ -91,8 +89,8 @@ namespace ConfectioneryBusinessLogic _saveToWord.CreateDoc(new WordInfo { FileName = model.FileName, - Title = "Список компонент", - Components = _componentStorage.GetFullList() + Title = "Список изделий", + Pastrys = _pastryStorage.GetFullList() }); } /// @@ -104,7 +102,7 @@ namespace ConfectioneryBusinessLogic _saveToExcel.CreateReport(new ExcelInfo { FileName = model.FileName, - Title = "Список компонент", + Title = "Список компонентов", PastryComponents = GetPastryComponent() }); } diff --git a/Confectionery/ConfectioneryBusinessLogic/WordInfo.cs b/Confectionery/ConfectioneryBusinessLogic/WordInfo.cs index b3bfc0b..7017f4f 100644 --- a/Confectionery/ConfectioneryBusinessLogic/WordInfo.cs +++ b/Confectionery/ConfectioneryBusinessLogic/WordInfo.cs @@ -11,6 +11,6 @@ namespace ConfectioneryBusinessLogic.OfficePackage.HelperModels { public string FileName { get; set; } = string.Empty; public string Title { get; set; } = string.Empty; - public List Components { get; set; } = new(); + public List Pastrys { get; set; } = new(); } }