コード例 #1
0
        // Add a developer team
        private void AddDeveloperTeam()
        {
            Console.Clear();
            DevTeam newDevTeam = new DevTeam();

            // Team Name
            Console.WriteLine("Please enter the new team's name:");
            newDevTeam.TeamName = Console.ReadLine();

            // Team ID
            Console.WriteLine("Please enter the new team's ID number:");
            string TeamIDAsString = Console.ReadLine();

            newDevTeam.TeamID = double.Parse(TeamIDAsString);

            _devTeamRepository.AddDeveloperTeam(newDevTeam);
        }
コード例 #2
0
        private void SeedContentList()
        {
            Developer jimmy    = new Developer("Jimmy McNamara", 347, true, "blue", 1);
            Developer elfrid   = new Developer("Elfrid Jacoby", 772, false, "red", 2);
            Developer amanda   = new Developer("Amanda Bynes", 199, true, "blue", 1);
            Developer emmanual = new Developer("Emmanual Moster", 056, true, "green", 3);
            Developer samuel   = new Developer("Samuel Mourfield", 998, true, "red", 2);
            Developer mary     = new Developer("Mary McSnoody", 245, false, "red", 2);
            DevTeam   blue     = new DevTeam("blue", 1);
            DevTeam   red      = new DevTeam("red", 2);
            DevTeam   green    = new DevTeam("green", 3);

            _developer.AddDeveloperToList(jimmy);
            _developer.AddDeveloperToList(elfrid);
            _developer.AddDeveloperToList(amanda);
            _developer.AddDeveloperToList(emmanual);
            _developer.AddDeveloperToList(samuel);
            _developer.AddDeveloperToList(mary);
            _devTeamRepo.AddDeveloperTeam(blue);
            _devTeamRepo.AddDeveloperTeam(red);
            _devTeamRepo.AddDeveloperTeam(green);
        }