Example #1
0
        static void ViewDevTeamMembers()
        {
            ViewAllDevTeams();

            Console.Write("Enter The Team Id Number For The Team You Want To View: ");
            var devTeamId = int.Parse(Console.ReadLine());

            var devTeam = _devTeamRepo.GetDevTeamById(devTeamId);

            foreach (var dev in devTeam.Devs)
            {
                Console.WriteLine($"Id: {dev.Id}     First Name: {dev.FirstName}     Last Name: {dev.LastName}");
            }
        }
Example #2
0
        private void ViewDeveloperTeamById()
        {
            Console.Clear();

            Console.WriteLine("Enter Team ID");
            int     inputTeamId = int.Parse(Console.ReadLine());
            DevTeam devTeam     = _devTeamRepo.GetDevTeamById(inputTeamId);

            Console.WriteLine($"{devTeam.DevTeamId}\n" +
                              $"{devTeam.DevTeamName}\n" +
                              $"{devTeam.DevTeamLanguage}\n" +
                              $"{devTeam.DevTeamResponsibilty}");

            foreach (var developer in devTeam.Developers)
            {
                Console.WriteLine($"{developer.EmployeeId}\n" +
                                  $"{developer.Title}\n" +
                                  $"{developer.FirstName } {developer.LastName}\n" +
                                  $"{developer.PluralsightAccess}");
            }
        }
Example #3
0
        public void ViewTeamsById()
        {
            Console.Clear();
            Console.WriteLine("Enter the ID Number for the team you would like to view:");
            int teamId = Convert.ToInt32(Console.ReadLine());

            Console.Clear();

            DevTeam teamToView = _devTeamRepo.GetDevTeamById(teamId);

            if (teamToView != null)
            {
                Console.WriteLine($"Team ID: {teamToView.TeamID}\n" +
                                  $"\nTeam Name: {teamToView.TeamName}\n");
                string pSight = "No";

                foreach (Developer dev in teamToView.DeveloperList)
                {
                    if (dev.HasPluralsight == true)
                    {
                        pSight = "Yes";
                        break;
                    }
                }

                Console.WriteLine($"Has Pluralsight: {pSight}\n");
                Console.WriteLine($"Developers assigned to this team:");

                foreach (Developer dev in teamToView.DeveloperList)
                {
                    Console.WriteLine($"{dev.DevName}, {dev.UniqueID}");
                }
            }
            else
            {
                Console.WriteLine("No team was found using the entered Team ID number.");
            }
        }