public static List <TrainPerCourse> CreateListsTrainersPerCourse() // CREATE LIST, TRAINERS per COURSE______________________________________ { List <Trainer> Trainers = ListProvider.CreateListsTrainers(); List <Course> Mathima = ListProvider.CreateListCourses(); TrainPerCourse TPC001 = new TrainPerCourse(Mathima, Trainers); List <TrainPerCourse> trainerspercourse = new List <TrainPerCourse>(); trainerspercourse.Add(TPC001); return(trainerspercourse); }
public static void PrintListTrainers() { // Output TRAINERS List______________________________________________________________________ List <Trainer> trainers = new List <Trainer>(); trainers = ListProvider.CreateListsTrainers(); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("-----------------------------------------------------------------------------------------"); Console.WriteLine($" {"TRAINERS NAME",-15} {" ",-15} | {"SUBJECT"}"); Console.WriteLine("-----------------------------------------------------------------------------------------"); Console.ForegroundColor = ConsoleColor.White; foreach (var item in trainers) { item.Output(); } //------------------------------------------------------------------------------------------- }
public static void UserInput() { string e = "E"; string i = "I"; string userInput = null; List <Trainer> trainers = ListProvider.CreateListsTrainers(); while (userInput != e) { Console.WriteLine("\nChoose Action: \n(I) INPUT DATA, \n(E) BACK "); userInput = Console.ReadLine(); if (userInput == i) { string tempName = "Anonimos"; string tempSurname = "Anonimopoulos"; string tempSubject = "Unspecified"; // Input Set Up__________________________________________________ Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Please Input Trainer Data"); Console.ForegroundColor = ConsoleColor.White; // Input NAME_____________________________________________________ string tempName0; Console.Write("Name: "); tempName0 = Console.ReadLine(); if (tempName0 == null) { tempName = "Anonimos"; } tempName = tempName0; // Input SURNAME__________________________________________________ string tempSurname0; Console.Write("SurName: "); tempSurname0 = Console.ReadLine(); if (tempSurname0 == null) { tempSurname = "Anonimopoulos"; } tempSurname = tempSurname0; // Input SUBJECT__________________________________________________ string tempSubject0; Console.Write("Subject: "); tempSubject0 = Console.ReadLine(); if (tempSubject0 == null) { tempSubject = "Unspecified"; } tempSubject = tempSubject0; Trainer temp = new Trainer(tempName, tempSurname, tempSubject); trainers.Add(temp); foreach (var item in trainers) { item.Output(); } } else if (userInput == e) // Step Back Command { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("BACK"); Console.ForegroundColor = ConsoleColor.White; } else // In the Case of false Data Input { Console.ForegroundColor = ConsoleColor.DarkRed; Console.WriteLine("Unindentified Input, Please Choose Again"); Console.ForegroundColor = ConsoleColor.White; } } }