From c1df34a0eec20c6dd612f623dc0b1ac49c2d6e71 Mon Sep 17 00:00:00 2001 From: Zhelovanov_Dmitrii Date: Wed, 17 May 2023 12:02:48 +0400 Subject: [PATCH] =?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; + + } } }