private static void RemoveCollectionItem(FRCollectionBase collection, Base item) { if (item != null) { collection.Remove(item); } }
private static void UpdateCollectionItem(FRCollectionBase collection, Base oldItem, Base newItem) { if (oldItem != null) { var index = collection.IndexOf(oldItem); collection.RemoveAt(index); collection.Insert(index, newItem); } else { collection.Add(newItem); } }
/// <inheritdoc/> public override void GetData() { base.GetData(); FRCollectionBase list = new FRCollectionBase(); Objects.CopyTo(list); foreach (ReportComponentBase obj in list) { obj.GetData(); obj.OnAfterData(); // break the component if it is of BreakableComponent an has non-empty BreakTo property if (obj is BreakableComponent && (obj as BreakableComponent).BreakTo != null && (obj as BreakableComponent).BreakTo.GetType() == obj.GetType()) { (obj as BreakableComponent).Break((obj as BreakableComponent).BreakTo); } } OnAfterData(); }