From a78852baa3bd16bc39060fb40d5707ecee9b1ffd Mon Sep 17 00:00:00 2001 From: bekodeg Date: Wed, 27 Mar 2024 08:49:49 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=BC=D0=B5=D0=B6=D1=83?= =?UTF-8?q?=D1=82=D0=BE=D1=87=D0=BD=D1=8B=D0=B5=20=D0=B8=D0=B7=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogics/ReportLogic.cs | 15 +-------------- .../OfficePackage/Implements/SaveToPdf.cs | 1 - 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/SushiBar/SushiBarBusinessLogic/BusinessLogics/ReportLogic.cs b/SushiBar/SushiBarBusinessLogic/BusinessLogics/ReportLogic.cs index 50b641b..0ddbb56 100644 --- a/SushiBar/SushiBarBusinessLogic/BusinessLogics/ReportLogic.cs +++ b/SushiBar/SushiBarBusinessLogic/BusinessLogics/ReportLogic.cs @@ -32,23 +32,15 @@ namespace SushiBarBusinessLogic.BusinessLogics /// public List GetSushiComponent() { + var components = _componentStorage.GetFullList(); var sushis = _sushiStorage.GetFullList(); var list = new List(); - foreach (var sushi in sushis) { var record = new ReportSushiComponentViewModel { - SushiName = sushi.SushiName, - Components = new List>(), TotalCount = 0 }; - foreach (var component in sushi.SushiComponents) { - record.Components.Add(new Tuple( - component.Value.Item1.ComponentName, - component.Value.Item2 - )); - record.TotalCount += component.Value.Item2; } list.Add(record); } @@ -63,7 +55,6 @@ namespace SushiBarBusinessLogic.BusinessLogics { return _orderStorage.GetFilteredList(new OrderSearchModel { - DateFrom = model.DateFrom, DateTo = model.DateTo }) .Select(x => new ReportOrdersViewModel @@ -80,13 +71,10 @@ namespace SushiBarBusinessLogic.BusinessLogics /// Сохранение компонент в файл-Word /// /// - public void SaveSushisToWordFile(ReportBindingModel model) { _saveToWord.CreateDoc(new WordInfo { FileName = model.FileName, - Title = "Список суши", - Sushis = _sushiStorage.GetFullList() }); } /// @@ -98,7 +86,6 @@ namespace SushiBarBusinessLogic.BusinessLogics _saveToExcel.CreateReport(new ExcelInfo { FileName = model.FileName, - Title = "Список суши", SushiComponents = GetSushiComponent() }); } diff --git a/SushiBar/SushiBarBusinessLogic/OfficePackage/Implements/SaveToPdf.cs b/SushiBar/SushiBarBusinessLogic/OfficePackage/Implements/SaveToPdf.cs index 933ac9c..220a1c4 100644 --- a/SushiBar/SushiBarBusinessLogic/OfficePackage/Implements/SaveToPdf.cs +++ b/SushiBar/SushiBarBusinessLogic/OfficePackage/Implements/SaveToPdf.cs @@ -82,7 +82,6 @@ namespace SushiBarBusinessLogic.OfficePackage.Implements row.Cells[i].Borders.Right.Width = borderWidth; row.Cells[i].Borders.Top.Width = borderWidth; row.Cells[i].Borders.Bottom.Width = borderWidth; - row.Cells[i].Format.Alignment = GetParagraphAlignment(rowParameters.ParagraphAlignment); row.Cells[i].VerticalAlignment = VerticalAlignment.Center; } }