/// <summary> /// Registers the User. /// </summary> public static void Register() { try { Clear(); WriteLine(new string('-', 40)); WriteLine(new string(' ', 16) + "REGISTER" + new string(' ', 16)); WriteLine(new string('-', 40)); User user = new User(); WriteLine("Enter Username: "******"Enter Password:"******"First Name: "); user.FirstName = ReadLine(); WriteLine("Last Name: "); user.LastName = ReadLine(); UBusiness.Register(user); Login(); } catch { WriteLine("An unexpected ERROR occured! Please try again later."); Environment.Exit(1); } }
/// <summary> /// Logins the User into his Account. /// </summary> public static void Login() { try { Clear(); WriteLine(new string('-', 40)); WriteLine(new string(' ', 17) + "LOGIN" + new string(' ', 18)); WriteLine(new string('-', 40)); WriteLine("Enter Username:"******"Enter Password:"******"Unknown Username or Password!"); } else { ShowMenu(); TakeInput(); } } catch (Exception currentException) { WriteLine("An unexpected ERROR occured! Please try again later."); WriteLine($"[{currentException.Message}]"); Environment.Exit(1); } }