Правка1
This commit is contained in:
parent
bfb91e7f4c
commit
d20628d88b
@ -71,14 +71,8 @@ namespace MotorPlantFileImplement.Implements
|
||||
private OrderViewModel GetViewModel(Order order)
|
||||
{
|
||||
var viewModel = order.GetViewModel;
|
||||
foreach (var comp in source.Engines)
|
||||
{
|
||||
if (comp.Id == order.EngineId)
|
||||
{
|
||||
viewModel.EngineName = comp.EngineName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
var engine = source.Engines.FirstOrDefault(x => x.Id == order.EngineId);
|
||||
viewModel.EngineName = engine?.EngineName;
|
||||
return viewModel;
|
||||
}
|
||||
}
|
||||
|
@ -37,11 +37,7 @@ namespace MotorPlantListImplement.Models
|
||||
{
|
||||
return;
|
||||
}
|
||||
EngineId = model.EngineId;
|
||||
Count = model.Count;
|
||||
Sum = model.Sum;
|
||||
Status = model.Status;
|
||||
DateCreate = model.DateCreate;
|
||||
DateImplement = model.DateImplement;
|
||||
}
|
||||
public OrderViewModel GetViewModel => new()
|
||||
|
Loading…
Reference in New Issue
Block a user