From c44bd13c8546569b6952b99740773738b4aaef9b Mon Sep 17 00:00:00 2001 From: dimazhelovanov Date: Mon, 27 Mar 2023 08:25:33 +0400 Subject: [PATCH 1/2] =?UTF-8?q?=D0=9F=D1=80=D0=B8=D0=BD=D1=8F=D1=82=D0=B0?= =?UTF-8?q?=D1=8F=20=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=BD=D0=B0=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OfficePackage/AbstractSaveToWord.cs | 13 ------------- .../OfficePackage/HelperModels/WordInfo.cs | 2 +- .../Implements/OrderStorage.cs | 2 +- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/OfficePackage/AbstractSaveToWord.cs b/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/OfficePackage/AbstractSaveToWord.cs index b16941e..c430a84 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/OfficePackage/AbstractSaveToWord.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/OfficePackage/AbstractSaveToWord.cs @@ -24,19 +24,6 @@ WordTextProperties { Bold = true, Size = "24", }) }, JustificationType = WordJustificationType.Center } }); - /* foreach (var component in info.Components) - { - CreateParagraph(new WordParagraph - { - Texts = new List<(string, WordTextProperties)> { -(component.ComponentName, new WordTextProperties { Size = "24"}) }, - TextProperties = new WordTextProperties - { - Size = "24", - JustificationType = WordJustificationType.Both - } - }); - }*/ foreach (var manufacture in info.Manufactures) { CreateParagraph(new WordParagraph diff --git a/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/OfficePackage/HelperModels/WordInfo.cs b/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/OfficePackage/HelperModels/WordInfo.cs index 2613a84..5c8699c 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/OfficePackage/HelperModels/WordInfo.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/OfficePackage/HelperModels/WordInfo.cs @@ -11,7 +11,7 @@ namespace BlacksmithWorkshopBusinessLogic.OfficePackage.HelperModels { public string FileName { get; set; } = string.Empty; public string Title { get; set; } = string.Empty; - // public List Components { get; set; } = new(); + public List Manufactures { get; set; } = new(); } } diff --git a/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Implements/OrderStorage.cs b/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Implements/OrderStorage.cs index b31c2dd..0113bc8 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Implements/OrderStorage.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Implements/OrderStorage.cs @@ -59,7 +59,7 @@ namespace BlacksmithWorkshopListImplement.Implements foreach (var order in _source.Orders) { - if (order.Id == model.Id )/*|| model.DateFrom <= order.DateCreate && order.DateCreate <= model.DateTo)*/ + if (order.Id == model.Id || model.DateFrom <= order.DateCreate && order.DateCreate <= model.DateTo) { result.Add(order.GetViewModel); } From c1df34a0eec20c6dd612f623dc0b1ac49c2d6e71 Mon Sep 17 00:00:00 2001 From: Zhelovanov_Dmitrii Date: Wed, 17 May 2023 12:02:48 +0400 Subject: [PATCH 2/2] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'BlacksmithWorkshop/BlacksmithWorkshop?= =?UTF-8?q?ListImplement/Implements/OrderStorage.cs'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implements/OrderStorage.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Implements/OrderStorage.cs b/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Implements/OrderStorage.cs index 0113bc8..86d4410 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Implements/OrderStorage.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopListImplement/Implements/OrderStorage.cs @@ -59,7 +59,7 @@ namespace BlacksmithWorkshopListImplement.Implements foreach (var order in _source.Orders) { - if (order.Id == model.Id || model.DateFrom <= order.DateCreate && order.DateCreate <= model.DateTo) + if (order.Id == model.Id || model.DateFrom <= order.DateCreate && order.DateCreate <= model.DateTo || order.ClientId == model.ClientId) { result.Add(order.GetViewModel); } @@ -119,7 +119,16 @@ namespace BlacksmithWorkshopListImplement.Implements orderViewModel.ManufactureName = manufacture.ManufactureName; } } - return orderViewModel; + foreach (var client in _source.Clients) + { + if (client.Id == order.ClientId) + { + orderViewModel.ClientFIO = client.ClientFIO; + } + } + return orderViewModel; + + } } }