From f21c6182726266564436649dc434266e4fa623cd Mon Sep 17 00:00:00 2001 From: Salikh Date: Sun, 28 Apr 2024 19:02:17 +0400 Subject: [PATCH] final commit --- .../MotorPlantDatabaseImplement/Implements/OrderStorage.cs | 6 +++--- .../MotorPlantFileImplement/Implements/OrderStorage.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MotorPlant/MotorPlantDatabaseImplement/Implements/OrderStorage.cs b/MotorPlant/MotorPlantDatabaseImplement/Implements/OrderStorage.cs index f47b0ee..688d32e 100644 --- a/MotorPlant/MotorPlantDatabaseImplement/Implements/OrderStorage.cs +++ b/MotorPlant/MotorPlantDatabaseImplement/Implements/OrderStorage.cs @@ -82,11 +82,11 @@ namespace MotorPlantDatabaseImplement.Implements if (model == null) return null; using var context = new MotorPlantDatabase(); - foreach (var Flower in context.Engines) + foreach (var Engine in context.Engines) { - if (Flower.Id == model.EngineId) + if (Engine.Id == model.EngineId) { - model.EngineName = Flower.EngineName; + model.EngineName = Engine.EngineName; break; } } diff --git a/MotorPlant/MotorPlantFileImplement/Implements/OrderStorage.cs b/MotorPlant/MotorPlantFileImplement/Implements/OrderStorage.cs index 95416f2..df30565 100644 --- a/MotorPlant/MotorPlantFileImplement/Implements/OrderStorage.cs +++ b/MotorPlant/MotorPlantFileImplement/Implements/OrderStorage.cs @@ -78,9 +78,9 @@ namespace MotorPlantFileImplement.Implements private OrderViewModel GetViewModel(Order order) { var viewModel = order.GetViewModel; - var flower = source.Engines.FirstOrDefault(x => x.Id == order.EngineId); + var engine = source.Engines.FirstOrDefault(x => x.Id == order.EngineId); var client = source.Clients.FirstOrDefault(x => x.Id == order.ClientId); - viewModel.EngineName = flower?.EngineName; + viewModel.EngineName = engine?.EngineName; viewModel.ClientFIO = client?.ClientFIO; return viewModel; }