Esempio n. 1
0
        //Add Team Members
        private void AddTeamMembers()
        {
            //view teams


            ViewTeamNames();
            List <DevTeam> listOfTeams = _devTeamRepo.GetDevTeamList();

            Console.WriteLine("Which Team ID do you want to add memebers to?");
            string teamID = Console.ReadLine().ToLower();

            Console.WriteLine("What is the team number?");
            string newName = Console.ReadLine();


            // view developers list
            ViewDeveloperList();

            Console.WriteLine("Which developer do you want to add?  Please give developers CompanyID");
            string developerID = Console.ReadLine().ToLower();

            //add developer to team
            _devTeamRepo.AddDevelopersToTeam(teamID, developerID);

            //add team number to developer
            // _developerRepo   //  add to newD (newName,teamID)
        }
Esempio n. 2
0
        //#6 Add developer to team
        private void TeamAddDeveloper()
        {
            Console.Clear();
            List <DevTeam>   listOfDevTeams   = _devTeamRepo.GetDevTeamList();
            List <Developer> listOfDevelopers = _developerRepo.GetDeveloperList();

            TeamDisplay();
            Console.WriteLine("Add developers to which team? Please enter the team's ID number.");
            int    addTeamInput = int.Parse(Console.ReadLine());
            string nameOfTeam;
            bool   added = false;

            Console.Clear();
            foreach (DevTeam devteam in listOfDevTeams)
            {
                if (devteam.TeamNumber == addTeamInput)
                {
                    Console.WriteLine($"\n{devteam.TeamName} contains the following members:\n");
                    nameOfTeam = devteam.TeamName;
                    for (int i = 0; i < devteam.Members.Count; i++)
                    {
                        Console.WriteLine(devteam.Members[i]);
                    }
                    List <string> memberListName = new List <string>();
                    DisplayAllDevelopers();
                    while (!added)
                    {
                        Console.WriteLine("\nEnter the ID number of the developers you would like to add.\n" +
                                          "Press return / enter between each developer's ID number\n" +
                                          "Enter 'Done' when complete\n");
                        string addDevNum = Console.ReadLine();
                        while (addDevNum != "Done")
                        {
                            int       addDevID = int.Parse(addDevNum);
                            Developer newDev   = _developerRepo.GetDeveloperByID(addDevID);
                            memberListName.Add(newDev.Name);
                            addDevNum = Console.ReadLine();
                        }
                        added = true;
                    }
                    Console.WriteLine($"\nThe following developers were added to {devteam.TeamName}:\n");
                    for (int i = 0; i < memberListName.Count; i++)
                    {
                        Console.WriteLine(memberListName[i]);
                        devteam.Members.Add(memberListName[i]);
                    }
                    List <string> newList    = devteam.Members;
                    DevTeam       modDevTeam = new DevTeam(nameOfTeam, addTeamInput, newList);
                    added = _devTeamRepo.UpdateExistingDevTeam(nameOfTeam, modDevTeam);
                }
            }
            if (added)
            {
                Console.WriteLine("\nDevelopers have been successfully added to the team.");
            }
            else
            {
                Console.WriteLine("\nDevelopers were not added to the team.");
            }
        }
Esempio n. 3
0
        private void DisplayAllDevTeams()
        {
            Console.Clear();
            List <DevTeam> listOfDevTeams = _devTeamRepo.GetDevTeamList();

            foreach (DevTeam devteam in listOfDevTeams)
            {
                Console.WriteLine($"Team Name: {devteam.TeamName}\n" +
                                  $"Team ID Number: {devteam.TeamIDNum}\n\n");
            }
        }
Esempio n. 4
0
        private void ViewDevTeams()
        {
            Console.Clear();
            List <DevTeam> devTeams = _devTeamRepo.GetDevTeamList();

            foreach (DevTeam team in devTeams)
            {
                Console.WriteLine($"Team Color: {team.DevTeamColor}\n" +
                                  $"Team ID: {team.DevTeamID}");
            }
        }
Esempio n. 5
0
        private void GetDevTeamList()
        {
            Console.Clear();

            List <DevTeamContent> listOfDevTeams = _teamRepo.GetDevTeamList();

            foreach (DevTeamContent content in listOfDevTeams)
            {
                Console.WriteLine($"Team Name: {content.TeamName}\n" +
                                  $"Team ID: {content.TeamID}");
            }
        }
        // View All Dev Teams
        private void DisplayAllDevTeams()
        {
            Console.Clear();

            List <DevTeam> listOfTeams = _devTeamRepo.GetDevTeamList();

            foreach (DevTeam team in listOfTeams)
            {
                Console.WriteLine($"Team Name: {team.TeamName}\n" +
                                  $"Team ID: {team.TeamId}");
            }
        }
Esempio n. 7
0
        public void ViewAllTeams()
        {
            Console.Clear();

            List <DevTeam> listOfDevTeams = _devTeamRepo.GetDevTeamList();

            foreach (DevTeam team in listOfDevTeams)
            {
                Console.WriteLine($"\nTeam ID: {team.TeamID}\n" +
                                  $"Team Name: {team.TeamName}");
            }
        }
Esempio n. 8
0
        } //end of ViewAllDevelopers

        private void ViewAllDeveloperTeams()
        {
            Console.Clear();

            List <DevTeam> listOfDeveloperTeams = _devTeamRepo.GetDevTeamList();

            foreach (DevTeam devTeam in listOfDeveloperTeams)
            {
                Console.WriteLine($"Team ID:{devTeam.DevTeamId}\n" +
                                  $"Team Name: {devTeam.DevTeamName}\n" +
                                  $"Team Responsibilities: {devTeam.DevTeamResponsibilty}\n" +
                                  $"Team Language: {devTeam.DevTeamLanguage}\n" +
                                  $"****************************************\n");

                //this will allow the developers in a speciffic devTeam to show
                ViewDeveloperInfo(devTeam);
            }
        } //end of ViewAllDeveloperTeams
Esempio n. 9
0
        private void DisplayAllDevTeams()
        {
            Console.Clear();

            List <DevTeam> listOfTeams = _DevTeamRepo.GetDevTeamList();

            foreach (DevTeam devTeam in listOfTeams)
            {
                /*Console.WriteLine($"Name: {devTeam.TeamName},\n" +
                 *  $" ID Number: {devTeam.TeamID}\n" +
                 *  $" Members: {devTeam.DevTeamMembers}");*/

                Console.WriteLine($"Name: {devTeam.TeamName},\n" +
                                  $" ID Number: {devTeam.TeamID}\n");
                foreach (Developer dev in devTeam.DevTeamMembers)
                {
                    Console.WriteLine($"{dev.Name}, {dev.IDNumber}\n");
                }
            }
        }