Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void MainMenu()
- {
- char choice;
- // Main menu
- Console.WriteLine("Press [1] to Login as Admin");
- Console.WriteLine("Press [2] to Login as Student");
- choice = char.Parse(Console.ReadLine());
- if (choice !='1' && choice != '2')
- {
- Console.WriteLine("Invalid Choice");
- MainMenu();
- }
- else {
- switch (choice)
- {
- //Admin menu
- case '1':
- Console.WriteLine("Please Enter the Admin name : ");
- string adminName = Console.ReadLine();
- Console.WriteLine("Please Enter the Password : ");
- string adminPassword = Console.ReadLine();
- if (LoginAdmin(adminName, adminPassword))
- {
- AdminMenu();
- }
- else
- {
- Console.WriteLine("Invalid Username or Password !");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement