示例#1
0
        //------
        private void addNodes(EmpNode nod, AbstractEmployee emp)
        {
            AbstractEmployee newEmp;
            EmpNode          newNode;
            IEnumerator      empEnum;

            empEnum = emp.getSubordinates();

            while (empEnum.MoveNext())
            {
                newEmp  = (AbstractEmployee)empEnum.Current;
                newNode = new EmpNode(newEmp);
                nod.Nodes.Add(newNode);
                addNodes(newNode, newEmp);
            }
        }