Merge branch 'LabWork02_Base' into LabWork02_Hard

This commit is contained in:
Данила Мочалов 2023-03-10 21:06:32 +04:00
commit 27bd7178b1

View File

@ -86,13 +86,10 @@ namespace LawFirmFileImplement.Implements
private OrderViewModel GetViewModel(Order order)
{
var viewModel = order.GetViewModel;
foreach (var document in source.Documents)
{
if (document.Id == order.DocumentId)
var document = source.Documents.FirstOrDefault(x => x.Id == order.DocumentId);
if (document != null)
{
viewModel.DocumentName = document.DocumentName;
break;
}
}
return viewModel;
}