public void ShowFunctionalities() { Console.WriteLine("**********************Welcome to Online Ticket Booking System**********************"); Console.WriteLine("Enter any one\n\n1=>Viewmovies\n2=>Login\n3=>Sign-In"); try { int.TryParse(Console.ReadLine(), out int input); switch ((Todo)(input)) { case Todo.viewmovies: module.ViewMovieDetails(); break; case Todo.login: login.IdentifyRole(); break; case Todo.signIn: Signin sign = new Signin(); break; } } catch (Exception e) { Console.WriteLine(e.Message); } }
public static void AskUserForSignin() { while (true) { Console.WriteLine("You are new user,signing-in is mandatory for booking"); Console.WriteLine("Do you want to sign-in\n1=>yes\n2=>no"); int.TryParse(Console.ReadLine(), out int answer); if (answer.Equals((int)Choice.yes)) { Signin signin = new Signin(); } else if (answer.Equals((int)Choice.no)) { Console.WriteLine("Okay!!!Thanks,See you next time :)"); } else { Console.WriteLine("You entered wrong input"); continue; } break; } }