From 467fd77452871e27b7f95a6a1762f7d4b8e28c71 Mon Sep 17 00:00:00 2001 From: Yourdax Date: Tue, 27 Aug 2024 19:20:42 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BE=D1=87=D0=B5=D0=BD=D1=8C=20=D0=BD=D0=B0?= =?UTF-8?q?=D0=B4=D0=B5=D1=8E=D1=81=D1=8C=20=D1=87=D1=82=D0=BE=20=D1=84?= =?UTF-8?q?=D1=84=D1=84=D1=84=D1=84=D1=81=D1=81=D0=B5=D0=B5=D0=B5=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OfficePackage/AbstractSaveToPdf.cs | 20 +++++++++++-------- .../Controllers/HomeController.cs | 4 ++-- .../DiningRoomUserApp/Views/Home/Enter.cshtml | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/DiningRoom/DiningRoomBusinessLogic/OfficePackage/AbstractSaveToPdf.cs b/DiningRoom/DiningRoomBusinessLogic/OfficePackage/AbstractSaveToPdf.cs index a9b38bb..4ce0776 100644 --- a/DiningRoom/DiningRoomBusinessLogic/OfficePackage/AbstractSaveToPdf.cs +++ b/DiningRoom/DiningRoomBusinessLogic/OfficePackage/AbstractSaveToPdf.cs @@ -37,7 +37,7 @@ namespace DiningRoomBusinessLogic.OfficePackage // Добавление заголовка для элементов компонента CreateRow(new PdfRowParameters { - Texts = new List { "","","Карта", "Блюдо" }, + Texts = new List { "","","Алк. карта", "Блюдо" }, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center }); @@ -45,16 +45,20 @@ namespace DiningRoomBusinessLogic.OfficePackage // Добавление строк с элементами компонента foreach (var item in group) { - CreateRow(new PdfRowParameters + if(!string.IsNullOrEmpty(item.CardName) || !string.IsNullOrEmpty(item.ProductName)) { - Texts = new List + CreateRow(new PdfRowParameters { - string.IsNullOrEmpty(item.CardName) ? "N/A" : item.CardName, - string.IsNullOrEmpty(item.ProductName) ? "N/A" : item.ProductName + Texts = new List + { + "","", + string.IsNullOrEmpty(item.CardName) ? "" : item.CardName, + string.IsNullOrEmpty(item.ProductName) ? "" : item.ProductName }, - Style = "Normal", - ParagraphAlignment = PdfParagraphAlignmentType.Left - }); + Style = "Normal", + ParagraphAlignment = PdfParagraphAlignmentType.Left + }); + } } } diff --git a/DiningRoom/DiningRoomUserApp/Controllers/HomeController.cs b/DiningRoom/DiningRoomUserApp/Controllers/HomeController.cs index e92fdd6..8c388fe 100644 --- a/DiningRoom/DiningRoomUserApp/Controllers/HomeController.cs +++ b/DiningRoom/DiningRoomUserApp/Controllers/HomeController.cs @@ -519,7 +519,7 @@ namespace DiningRoomUserApp.Controllers } // Генерация HTML таблицы - string table = "

Отчет по компонентам

"; + string table = "

Отчет по продуктам

"; table += "
"; table += ""; table += ""; @@ -527,7 +527,7 @@ namespace DiningRoomUserApp.Controllers table += ""; table += ""; table += ""; - table += ""; + table += ""; table += ""; table += ""; table += ""; diff --git a/DiningRoom/DiningRoomUserApp/Views/Home/Enter.cshtml b/DiningRoom/DiningRoomUserApp/Views/Home/Enter.cshtml index c81491e..e28ce93 100644 --- a/DiningRoom/DiningRoomUserApp/Views/Home/Enter.cshtml +++ b/DiningRoom/DiningRoomUserApp/Views/Home/Enter.cshtml @@ -28,7 +28,7 @@
ПродуктБлюдоАлкогольная КартаСтоимость компонентаСтоимость продукта