Exemplo n.º 1
0
        private void SetAreaParents(List <WcArea> source, WcArea target, WcArea current)
        {
            var parent = source.Find(a => a.Current.Id == current.Current.ParentId);

            if (parent != null)
            {
                SetAreaParents(source, target, parent);
                target.Parents.Add(parent);
            }
        }
Exemplo n.º 2
0
        private void SetAreaChildren(List <WcArea> source, WcArea target, WcArea current)
        {
            var children = source.FindAll(a => a.Current.ParentId == current.Current.Id);

            if (children.Count > 0)
            {
                target.Children.AddRange(children);
                foreach (var child in children)
                {
                    SetAreaChildren(source, target, child);
                }
            }
        }