コード例 #1
0
        //Add Team Name
        private void AddNewTeam()
        {
            bool add = true;

            while (add)
            {
                // Get Dev Team Name
                Console.WriteLine("What is new Team name: ");
                string devTeamName = Console.ReadLine().ToLower();
                //Add Dev Team ID
                Console.WriteLine("What is new Teamm ID: ");
                string devTeamID = Console.ReadLine().ToLower();


                DevTeam newDevTeam = new DevTeam(devTeamName, devTeamID);
                _devTeamRepo.AddDevTeamsToList(newDevTeam);

                //Add another devteam

                string contin;
                Console.WriteLine("Do you want to add another Team?");
                do
                {
                    contin = Console.ReadLine().ToLower();
                    if (!contin.Equals("yes") && !contin.Equals("no"))
                    {
                        Console.WriteLine("Please enter yes or no");
                    }
                }while (!contin.Equals("yes") && !contin.Equals("no"));

                if (contin.Equals("yes"))
                {
                    add = true;
                }
                else if (contin.Equals("no"))
                {
                    add = false;
                }
            }
        }