final commit
This commit is contained in:
parent
c18421c599
commit
f21c618272
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user