OrderCheck
This commit is contained in:
parent
58ffae6460
commit
eb19e42237
@ -19,7 +19,7 @@ namespace SewingDressesListImplement.Implements
|
||||
var result = new List<OrderViewModel>();
|
||||
foreach (var order in _source.Orders)
|
||||
{
|
||||
result.Add(order.GetViewModel);
|
||||
result.Add(AcessDressesStorage(order.GetViewModel));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -31,7 +31,7 @@ namespace SewingDressesListImplement.Implements
|
||||
{
|
||||
if (order.Id == model.Id)
|
||||
{
|
||||
result.Add(order.GetViewModel);
|
||||
result.Add(AcessDressesStorage(order.GetViewModel));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@ -94,5 +94,17 @@ namespace SewingDressesListImplement.Implements
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public OrderViewModel AcessDressesStorage(OrderViewModel model)
|
||||
{
|
||||
foreach (var dress in _source.Dresses)
|
||||
{
|
||||
if (dress.Id == model.DressId)
|
||||
{
|
||||
model.DressName = dress.DressName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return model;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user