From 636a9b51a922ea956f20b6ff82f270d9e2856d3b Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Sat, 18 Mar 2023 18:09:04 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=BC=D0=B5=D0=B6=D1=83?= =?UTF-8?q?=D1=82=D0=BE=D1=87=D0=BD=D0=BE=D0=B5=20=D1=81=D0=BE=D1=85=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5.=20=D0=98=D0=91=D0=9E=20?= =?UTF-8?q?=D0=A3=D0=A0=D0=90,=20=D0=9E=D0=A2=D0=A7=D0=81=D0=A2=20=D0=9D?= =?UTF-8?q?=D0=90=D0=9A=D0=9E=D0=9D=D0=95=D0=A6-=D0=A2=D0=9E=20=D0=9F?= =?UTF-8?q?=D0=95=D0=A0=D0=95=D0=A1=D0=A2=D0=90=D0=9B=20=D0=92=D0=AB=D0=9A?= =?UTF-8?q?=D0=98=D0=94=D0=AB=D0=92=D0=90=D0=A2=D0=AC=20=D0=9E=D0=A8=D0=98?= =?UTF-8?q?=D0=91=D0=9A=D0=A3=20=D0=9E=20=D0=9A=D0=9E=D0=9D=D0=A4=D0=9B?= =?UTF-8?q?=D0=98=D0=9A=D0=A2=D0=95=20=D0=9C=D0=95=D0=A2=D0=9E=D0=94=D0=9E?= =?UTF-8?q?=D0=92.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BlacksmithWorkshop/BlacksmithWorkshop.csproj | 2 +- .../BlacksmithWorkshop/FormReportOrders.cs | 2 +- .../Implements/OrderStorage.cs | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/BlacksmithWorkshop.csproj b/BlacksmithWorkshop/BlacksmithWorkshop/BlacksmithWorkshop.csproj index 38ee435..6dfd051 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/BlacksmithWorkshop.csproj +++ b/BlacksmithWorkshop/BlacksmithWorkshop/BlacksmithWorkshop.csproj @@ -16,7 +16,7 @@ - + diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.cs index c6350b8..6a73f94 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormReportOrders.cs @@ -35,7 +35,7 @@ namespace BlacksmithWorkshop Dock = DockStyle.Fill }; - reportViewer.LocalReport.LoadReportDefinition(new FileStream("ReportOrders.rdlc", FileMode.Open)); + reportViewer.LocalReport.LoadReportDefinition(new FileStream("C:\\Users\\Programmist73\\Desktop\\Практика\\2-й курс\\4-й семестр\\ТП\\PIbd-21_Eliseev_E.E._BlacksmithWorkshop\\BlacksmithWorkshop\\BlacksmithWorkshop\\ReportOrders.rdlc", FileMode.Open)); Controls.Clear(); Controls.Add(reportViewer); diff --git a/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Implements/OrderStorage.cs b/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Implements/OrderStorage.cs index 10fc34a..df0a2f0 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Implements/OrderStorage.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Implements/OrderStorage.cs @@ -41,8 +41,16 @@ namespace BlacksmithWorkshopListImplement.Implements { var result = new List(); - if (!model.Id.HasValue) + if (!model.Id.HasValue && model.DateFrom.HasValue && model.DateTo.HasValue) { + foreach (var order in _source.Orders) + { + if (order.DateCreate >= model.DateFrom && order.DateCreate <= model.DateTo) + { + result.Add(GetViewModel(order)); + } + } + return result; }