From e0707a69e3a0de5097961e8fcbe8a574c4e57f65 Mon Sep 17 00:00:00 2001 From: Yunusov_Niyaz Date: Tue, 7 May 2024 22:57:55 +0400 Subject: [PATCH] Merge --- .../Implements/OrderStorage.cs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/CarRepairShop/CarRepairShopFileImplement/Implements/OrderStorage.cs b/CarRepairShop/CarRepairShopFileImplement/Implements/OrderStorage.cs index f60ad0d..f3c4d31 100644 --- a/CarRepairShop/CarRepairShopFileImplement/Implements/OrderStorage.cs +++ b/CarRepairShop/CarRepairShopFileImplement/Implements/OrderStorage.cs @@ -82,14 +82,6 @@ namespace CarRepairShopFileImplement.Implements } public OrderViewModel AccessStorage(OrderViewModel model) { - if (model == null) - return null; - var repair = source.Repairs.FirstOrDefault(x => (x.Id == model.RepairId)); - if (repair == null) - return model; - model.RepairName = repair.RepairName; - return model; - } var repair = source.Repairs.FirstOrDefault(x => x.Id == model.Id); var client = source.Clients.FirstOrDefault(x => x.Id == model.Id); var implementer = source.Implementers.FirstOrDefault(x => x.Id == model.ImplementerId); @@ -101,15 +93,5 @@ namespace CarRepairShopFileImplement.Implements model.ImplementerFIO = implementer.ImplementerFIO; return model; } - - public OrderViewModel AccessClientStorage(OrderViewModel model) - { - if (model == null) - return null; - var client = source.Clients.FirstOrDefault(x => x.Id == model.Id); - if (client != null) - model.ClientFIO = client.ClientFIO; - return model; - } } }