internal NodeAddress DeleteNode(NodeAddress na) { NodeAddress refNode = na.GetParent(); TreeViewMappingElement tvme = GetElement(refNode); refNode.AddLast(tvme.Delete(na.GetLast())); return(refNode); }
public void MoveNode(NodeAddress draggedNode, NodeAddress refNode) { NodeAddress parent = draggedNode.GetParent(); if (parent.IsEqual(refNode.GetParent())) { TreeViewMappingElement tvme = GetElement(parent); tvme.MoveNode(draggedNode.GetLast(), refNode.GetLast()); } if (parent.IsEqual(refNode)) { TreeViewMappingElement tvme = GetElement(parent); tvme.MoveNode(draggedNode.GetLast()); } }
public TreeViewMapping(List <Category> data) { Reset(); foreach (var itemC in data) { TreeViewMappingElement Map2 = Map.AddElement(itemC.CategoryName); foreach (var itemI in itemC.Institutions) { TreeViewMappingElement Map3 = Map2.AddElement(itemI.InstitutionName); foreach (var itemA in itemI.Accounts) { Map3.AddElement(itemA.AccountName); } } } }
internal void AddItem(NodeAddress nodeAddress, IAccountingElement iNewAcc) { TreeViewMappingElement elmt = GetElement(nodeAddress.GetParent()); TreeViewMappingElement newElmt = elmt.AddElement(nodeAddress.Address.Last(), TreeViewMappingElement.CreateElement(iNewAcc)); }
internal void Reset() { Map = new TreeViewMappingElement("Root"); }
public TreeViewMapping(SerializationInfo info, StreamingContext context) { Map = (TreeViewMappingElement)info.GetValue("Map", typeof(TreeViewMappingElement)); }
public IEnumerable <IAccountingElement> GetItemList(TreeViewMappingElement tvme) { return(new List <IAccountingElement> { }); }
public IEnumerable <IAccountingElement> GetItemList(TreeViewMappingElement tvme) { return((IEnumerable <IAccountingElement>)GetAccounts(tvme)); }
public IEnumerable <IAccount> GetAccounts(TreeViewMappingElement tvme) { return(tvme.Nodes.Select(x => GetAccount(x.Name))); }
public IEnumerable <IInstitution> GetInstitutions(TreeViewMappingElement tvme) { return(tvme.Nodes.Select(x => InstitutionsDictionary[x.Name])); }