Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- var receptionistView = new ReceptionistMainView();
- var adminView = new AdminMainView();
- Console.Write("Username: ");
- var userName = Console.ReadLine();
- Console.Write("Password: ");
- var password = Console.ReadLine();
- var authenticationService = new AuthentificationService();
- var user = authenticationService.Authenticate(userName, password);
- if (user != null)
- {
- Console.WriteLine("Succesfully logged in");
- Console.WriteLine($"Role {user.Role}");
- if (user.Role == "Receptionist")
- {
- receptionistView.Display();
- }
- if(user.Role == "Admin")
- {
- adminView.Display();
- }
- if (user.Role == "Vetrinarian")
- {
- }
- }
- else
- {
- Console.WriteLine("Access denied!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement