private void CreateStudent() { bool couldntCreateStudent = true; while (couldntCreateStudent) { Console.Clear(); Console.WriteLine("Create a student"); Console.WriteLine("Type the first name"); string fn = Console.ReadLine(); Console.WriteLine("Type the last name"); string ln = Console.ReadLine(); Console.WriteLine("Type in the name of the class:"); string classRoom = SelectClass(); if (MEGC.CreateStudent(fn, ln, classRoom)) { Console.WriteLine("Student created"); couldntCreateStudent = false; } else { Console.WriteLine("Student wasn't created, try again."); } Console.WriteLine("Press enter to continue"); Console.ReadKey(); } }
private void CreateStudent() { Console.Clear(); Console.WriteLine("Create a student"); Console.WriteLine("Type the first name"); string fn = Console.ReadLine(); Console.WriteLine("Type the last name"); string ln = Console.ReadLine(); MEGC.CreateStudent(fn, ln, this.username); Console.Clear(); }