private void HandleNewAccount() { // Input validation. if (ValidateInput()) { // Get Random UserID int userID = MakeUserID(); // fill out a new customer info object with their info from // the fields CustomerInfo customerInfo = new() { Name = NameInput.Text, Address = AddressInput.Text, City = CityInput.Text, State = StateInput.Text, Zip = ZipInput.Text, PhoneNumber = PhoneInput.Text, Age = (int)AgeInput.Value, CreditCardNumber = CreditCardInput.Text }; // fill out a new user object with their info User user = new() { LoginId = userID.ToString(), HashedPass = PasswordHandler.HashPassword(PasswordInput.Password), UserRole = Role.CUSTOMER, CustInfo = customerInfo }; // add the user to the database UserUtilities.AddUserToDB(user); // and display information to the user about their account being created outputInfo.Title = "Account Creation Successful!"; outputInfo.Message = $"Your Login ID is: {userID}, please remember it for future logins!"; outputInfo.Severity = InfoBarSeverity.Success; outputInfo.IsOpen = true; } }