Mochalov D.V. LabWork05_Hard #13

Closed
b0n3l3sS wants to merge 63 commits from LabWork05_Hard into LabWork05_Base
Showing only changes of commit 27bd7178b1 - Show all commits

View File

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