4 лаба, убарала список компонентов из ReportLogic GetTravelComponents
This commit is contained in:
parent
1b62d53fc4
commit
4c1eb57d14
@ -44,13 +44,10 @@ namespace TravelCompanyBusinessLogic.BusinessLogic
|
||||
Components = new List<(string Component, int Count)>(),
|
||||
TotalCount = 0
|
||||
};
|
||||
foreach (var component in components)
|
||||
foreach (var component in Travel.TravelComponents)
|
||||
{
|
||||
if (Travel.TravelComponents.ContainsKey(component.Id))
|
||||
{
|
||||
record.Components.Add(new(component.ComponentName, Travel.TravelComponents[component.Id].Item2));
|
||||
record.TotalCount += Travel.TravelComponents[component.Id].Item2;
|
||||
}
|
||||
record.Components.Add(new(component.Value.Item1.ComponentName, component.Value.Item2));
|
||||
record.TotalCount += component.Value.Item2;
|
||||
}
|
||||
list.Add(record);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user