private void RemoveBusinessObjectFromCollectionNode (IBusinessObjectCollection businessObjectCollection, IBusinessObject businessObject) { if (businessObjectCollection != null && ChildCollectionNodes.ContainsKey(businessObjectCollection)) { NodeState nodeState = ChildCollectionNodes[businessObjectCollection]; if (nodeState.IsLoaded) { RemoveBusinessObjectNode(businessObject); } else { UpdateNodeDummy(nodeState, businessObjectCollection.Count); } } }
private void AddBusinessObjectToCollectionNode (IBusinessObjectCollection businessObjectCollection, IBusinessObject businessObject) { if (businessObjectCollection != null && ChildCollectionNodes.ContainsKey(businessObjectCollection)) { NodeState nodeState = ChildCollectionNodes[businessObjectCollection]; if (nodeState.IsLoaded) { ITreeNode node = nodeState.Node; AddBusinessObjectNode(node.Nodes, businessObject); } else { UpdateNodeDummy(nodeState, businessObjectCollection.Count); } } }