Пример #1
0
        private void CreateNewEmployee()
        {
            Console.Clear();

            DevPOCO newEmployee = new DevPOCO();

            //Developer ID
            Console.WriteLine("Enter the employee ID: ");
            string idAsString = Console.ReadLine();

            newEmployee.DeveloperID = int.Parse(idAsString);

            //Firstname
            Console.WriteLine("Enter the employee's First Name: ");
            newEmployee.FirstName = Console.ReadLine();

            //Lastname
            Console.WriteLine("Enter the employee's Last Name: ");
            newEmployee.LastName = Console.ReadLine();

            //pluralsight
            Console.WriteLine("Does the employee have a PluralSight account? (y/n): ");
            string pluralsight = Console.ReadLine().ToLower();

            if (pluralsight == "y")
            {
                newEmployee.PluralSightAccount = true;
            }
            else
            {
                newEmployee.PluralSightAccount = false;
            }

            _devRepo.AddToDevelopersList(newEmployee);
        }