예제 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Do you want to import API data for badges? type yes or no");
            String response = Console.ReadLine();

            if (response == "yes")
            {
                List <Employee> employees = PeopleFetcher.GetFromApi();
                Util.MakeCSV(employees);
                Util.MakeBadges(employees);
            }
            else if (response == "no")
            {
                List <Employee> employees = PeopleFetcher.GetEmployees();
                Util.MakeCSV(employees);
                Util.MakeBadges(employees);
            }
            else
            {
                Console.Write("Invalid Response");
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            List <Employee> employees;

            Console.WriteLine("(M)anual or (A)uto Employee Generation (Auto is default): ");
            // get a name from the console and assign it to a variable
            string answer = Console.ReadLine();

            if (answer == "m" || answer == "M")
            {
                employees = PeopleFetcher.GetEmployees();
            }
            else
            {
                employees = PeopleFetcher.GetFromApi();
            }


            Util.PrintEmployees(employees);
            Util.MakeCSV(employees);
            Util.MakeBadges(employees);
        }