// Ακολουθούν μέθοδοι που ζητούν απο τον χρήστη να αποφασίσει αν θα συνεχίσει να δημιουργεί νέες προσθήκες // ή αν θέλει να επιστρεψει στο αρχικο κατα κύριο λόγο μενου public static string CheckContinueOrNot() { string answer = string.Empty; Standard_Messages.ShowContinueOrBack(); answer = StringAnswer(); while (!(answer.ToUpper() == "B" || answer.ToUpper() == "C")) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("\tChoose Between C Or B"); Console.ForegroundColor = ConsoleColor.White; Console.Write("\t : "); answer = StringAnswer(); } return(answer); }
public static void ContinueAddingStudOrNot() { string answer = CheckContinueOrNot(); while (answer.ToUpper() == "C") { Console.Clear(); Standard_Messages.Welcome(); Insert.InsertStudent(); Standard_Messages.ShowContinueOrBack(); answer = StringAnswer(); } if (answer.ToUpper() == "B") { MoveTools.BackOptionToInsertMenu(); } }
public static void ContinueAddingCourseOrNot() { string answer = CheckContinueOrNot(); while (answer.ToUpper() == "C") { Console.Clear(); Standard_Messages.Welcome(); Insert.InsertCourse(); Standard_Messages.ShowContinueOrBack(); answer = StringAnswer(); } if (answer.ToUpper() == "B") { Console.Clear(); Standard_Messages.Welcome(); Menu.InsertMenu(); } }