diff --git a/ComputerShopBusinessLogic/BusinessLogics/ReportLogic.cs b/ComputerShopBusinessLogic/BusinessLogics/ReportLogic.cs index 96121b8..42afe9e 100644 --- a/ComputerShopBusinessLogic/BusinessLogics/ReportLogic.cs +++ b/ComputerShopBusinessLogic/BusinessLogics/ReportLogic.cs @@ -82,7 +82,8 @@ namespace ComputerShopBusinessLogic.BusinessLogics Id = x.Id, DateCreate = x.DateCreate, ComputerName = x.ComputerName, - Sum = x.Sum + Sum = x.Sum, + Status = x.Status.ToString() }) .ToList(); } diff --git a/ComputerShopBusinessLogic/OfficePackage/AbstractSaveToPdf.cs b/ComputerShopBusinessLogic/OfficePackage/AbstractSaveToPdf.cs index 93e445a..2975757 100644 --- a/ComputerShopBusinessLogic/OfficePackage/AbstractSaveToPdf.cs +++ b/ComputerShopBusinessLogic/OfficePackage/AbstractSaveToPdf.cs @@ -22,10 +22,10 @@ namespace ComputerShopBusinessLogic.OfficePackage CreateParagraph(new PdfParagraph { 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", "3cm", "4cm" }); CreateRow(new PdfRowParameters { - Texts = new List { "Номер", "Дата заказа", "Изделие", "Сумма" }, + Texts = new List { "Номер", "Дата заказа", "Изделие", "Сумма", "Статус" }, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center }); @@ -33,7 +33,7 @@ namespace ComputerShopBusinessLogic.OfficePackage { CreateRow(new PdfRowParameters { - Texts = new List { order.Id.ToString(), order.DateCreate.ToShortDateString(), order.ComputerName, order.Sum.ToString() }, + Texts = new List { order.Id.ToString(), order.DateCreate.ToShortDateString(), order.ComputerName, order.Sum.ToString(), order.Status }, Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Left }); diff --git a/ComputerShopContracts/ViewModels/ReportOrderViewModel.cs b/ComputerShopContracts/ViewModels/ReportOrderViewModel.cs index 4c2fb75..189586c 100644 --- a/ComputerShopContracts/ViewModels/ReportOrderViewModel.cs +++ b/ComputerShopContracts/ViewModels/ReportOrderViewModel.cs @@ -12,5 +12,6 @@ namespace ComputerShopContracts.ViewModels public DateTime DateCreate { get; set; } public string ComputerName { get; set; } = string.Empty; public double Sum { get; set; } + public String Status { get; set; } = string.Empty; } } diff --git a/ComputersShop/ReportOrders.rdlc b/ComputersShop/ReportOrders.rdlc index 4aaff59..37bd825 100644 --- a/ComputersShop/ReportOrders.rdlc +++ b/ComputersShop/ReportOrders.rdlc @@ -33,6 +33,10 @@ Sum System.Decimal + + Status + System.String + ComputerShopContracts.ViewModels @@ -127,6 +131,9 @@ 2.5cm + + 2.5cm + @@ -260,6 +267,38 @@ + + + + true + true + + + + + Статус + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -387,6 +426,36 @@ + + + + true + true + + + + + =Fields!Status.Value + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -397,6 +466,7 @@ + @@ -413,7 +483,7 @@ 2.48391cm 0.55245cm 1.2cm - 16.44755cm + 18.94755cm 2