diff --git a/PrecastConcretePlantBusinessLogic/BusinessLogic/ReportLogic.cs b/PrecastConcretePlantBusinessLogic/BusinessLogic/ReportLogic.cs
index 3ba2a8e..8597407 100644
--- a/PrecastConcretePlantBusinessLogic/BusinessLogic/ReportLogic.cs
+++ b/PrecastConcretePlantBusinessLogic/BusinessLogic/ReportLogic.cs
@@ -33,7 +33,6 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
///
public List GetReinforcedComponent()
{
- var components = _componentStorage.GetFullList();
var reinforceds = _reinforcedStorage.GetFullList();
var list = new List();
@@ -45,17 +44,13 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
Components = new List<(string, int)>(),
TotalCount = 0
};
- foreach (var condition in components)
+ foreach (var component in reinforced.ReinforcedComponents)
{
- if (reinforced.ReinforcedComponents.ContainsKey(condition.Id))
- {
- record.Components.Add(new(condition.ComponentName, reinforced.ReinforcedComponents[condition.Id].Item2));
- record.TotalCount += reinforced.ReinforcedComponents[condition.Id].Item2;
- }
+ record.Components.Add(new(component.Value.Item1.ComponentName, component.Value.Item2));
+ record.TotalCount += component.Value.Item2;
}
list.Add(record);
}
-
return list;
}