снова готовая 2 лаба
This commit is contained in:
parent
9d66bdb886
commit
4782337fca
@ -82,14 +82,8 @@ namespace TravelCompanyFileImplement.Implements
|
||||
private OrderViewModel GetViewModel(Order order)
|
||||
{
|
||||
var viewModel = order.GetViewModel;
|
||||
foreach (var comp in source.Travels)
|
||||
{
|
||||
if (comp.Id == order.TravelId)
|
||||
{
|
||||
viewModel.TravelName = comp.TravelName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
var travel = source.Travels.FirstOrDefault(x => x.Id == order.TravelId);
|
||||
viewModel.TravelName = travel?.TravelName;
|
||||
return viewModel;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user