From 9337f1bc53f465e92789f7138de99bb8a3ea8eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D1=8F=D1=80=20=D0=90=D0=B3=D0=BB?= =?UTF-8?q?=D0=B8=D1=83=D0=BB=D0=BB=D0=BE=D0=B2?= Date: Wed, 1 Mar 2023 23:10:43 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=81=D1=82=D0=B0=D1=82=D1=83=D1=81=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=BA=D0=B0=D0=B7=D0=B0=20=D0=B2=20=D0=BE=D1=82=D1=87=D0=B5?= =?UTF-8?q?=D1=82=D0=B5=20=D0=B7=D0=B0=D0=BA=D0=B0=D0=B7=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OfficePackage/AbstractSaveToPdf.cs | 6 +- ConfectionaryBusinessLogic/ReportLogic.cs | 1 + Confectionery/ReportOrders.rdlc | 97 ++++++++++++++++--- .../ViewModels/ReportOrdersViewModel.cs | 4 +- 4 files changed, 91 insertions(+), 17 deletions(-) diff --git a/ConfectionaryBusinessLogic/OfficePackage/AbstractSaveToPdf.cs b/ConfectionaryBusinessLogic/OfficePackage/AbstractSaveToPdf.cs index 0487894..68e8d7d 100644 --- a/ConfectionaryBusinessLogic/OfficePackage/AbstractSaveToPdf.cs +++ b/ConfectionaryBusinessLogic/OfficePackage/AbstractSaveToPdf.cs @@ -18,11 +18,11 @@ namespace ConfectioneryBusinessLogic.OfficePackage Text = $"с {info.DateFrom.ToShortDateString()} по {info.DateTo.ToShortDateString()}", Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Center }); - CreateTable(new List { "2cm", "3cm", "6cm", "3cm" }); + CreateTable(new List { "2cm", "3cm", "6cm", "4cm", "3cm" }); CreateRow(new PdfRowParameters { - Texts = new List { "Номер", "Дата заказа", "Изделие", "Сумма" }, + Texts = new List { "Номер", "Дата заказа", "Изделие", "Статус заказа", "Сумма" }, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center }); @@ -31,7 +31,7 @@ namespace ConfectioneryBusinessLogic.OfficePackage { CreateRow(new PdfRowParameters { - Texts = new List { order.Id.ToString(), order.DateCreate.ToShortDateString(), order.PastryName, order.Sum.ToString() }, + Texts = new List { order.Id.ToString(), order.DateCreate.ToShortDateString(), order.PastryName, Convert.ToString(order.OrderStatus), order.Sum.ToString() }, Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Left }); diff --git a/ConfectionaryBusinessLogic/ReportLogic.cs b/ConfectionaryBusinessLogic/ReportLogic.cs index 68a557f..a58b073 100644 --- a/ConfectionaryBusinessLogic/ReportLogic.cs +++ b/ConfectionaryBusinessLogic/ReportLogic.cs @@ -87,6 +87,7 @@ namespace ConfectioneryBusinessLogic Id = x.Id, DateCreate = x.DateCreate, PastryName = x.PastryName, + OrderStatus = Convert.ToString(x.Status) ?? string.Empty, Sum = x.Sum }) .ToList(); diff --git a/Confectionery/ReportOrders.rdlc b/Confectionery/ReportOrders.rdlc index a9069bc..4a5e76b 100644 --- a/Confectionery/ReportOrders.rdlc +++ b/Confectionery/ReportOrders.rdlc @@ -2,7 +2,7 @@ 0 - + System.Data.DataSet /* Local Connection */ @@ -13,7 +13,7 @@ - AbstractShopContractsViewModels + ConfectioneryContractsViewModels /* Local Query */ @@ -25,19 +25,23 @@ DateCreate System.DateTime - - ProductName + + PastryName System.String Sum System.Decimal + + OrderStatus + ConfectioneryDataModels.OrderStatus + - AbstractShopContracts.ViewModels + ConfectioneryContracts.ViewModels ReportOrdersViewModel - AbstractShopContracts.ViewModels.ReportOrdersViewModel, AbstractShopContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + ConfectioneryContracts.ViewModels.ReportOrdersViewModel, ConfectioneryContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null @@ -125,7 +129,10 @@ 8.23317cm - 2.5cm + 3.02917cm + + + 2.87042cm @@ -228,6 +235,38 @@ + + + + true + true + + + + + Статус заказа + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -329,21 +368,21 @@ - + true true - =Fields!ProductName.Value + =Fields!PastryName.Value + + 2pt + 2pt + 2pt + 2pt + + + true + + @@ -397,6 +467,7 @@ + @@ -413,7 +484,7 @@ 2.48391cm 0.55245cm 1.2cm - 16.44755cm + 19.84713cm 2