Пример #1
0
 public static void DisplayAllEmployees(List <Employee> allEmployees)
 {
     foreach (Employee superior in EmployeeSearch.GetTopSuperiors(allEmployees))
     {
         DisplayEmployee(allEmployees, superior, 0);
         Console.WriteLine("\n");
     }
 }
Пример #2
0
 public static void DisplayEmployee(List <Employee> allEmployees, Employee employeeToDisplay, int depth)
 {
     if (!(employeeToDisplay is null))
     {
         Console.WriteLine(GetPreparedStringToDisplay(employeeToDisplay, depth));
         foreach (var subordinate in EmployeeSearch.GetSubordinates(allEmployees, employeeToDisplay.Id))
         {
             DisplayEmployee(allEmployees, subordinate, depth + 1);
         }
     }
 }