commit
This commit is contained in:
parent
2d9551268a
commit
a528263511
@ -83,14 +83,8 @@ namespace MotorPlantFileImplement.Implements
|
|||||||
private OrderViewModel GetViewModel(Order order)
|
private OrderViewModel GetViewModel(Order order)
|
||||||
{
|
{
|
||||||
var viewModel = order.GetViewModel;
|
var viewModel = order.GetViewModel;
|
||||||
foreach (var comp in source.Engines)
|
var engine = source.Engines.FirstOrDefault(x => x.Id == order.EngineId);
|
||||||
{
|
viewModel.EngineName = engine?.EngineName;
|
||||||
if (comp.Id == order.EngineId)
|
|
||||||
{
|
|
||||||
viewModel.EngineName = comp.EngineName;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return viewModel;
|
return viewModel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user