private static string getDefaultUsername()
        {
            string username = StudentRegistrationForm.getStudentName();

            username = username.ToLower();
            username = username.Replace(" ", "");
            return(username);
        }
        private static void buttonConfirm_Click(object sender, EventArgs e)
        {
            string username        = textBoxUsername.Text;
            string password        = textBoxPassword.Text;
            string confirmPassword = textBoxConfirmPassword.Text;

            if (username == "" || username.Replace(" ", "") == "")
            {
                MessageBox.Show("Username cannot be empty.");
                return;
            }
            if (!Program.getDatabaseUtils().isUsernameUnique(username))
            {
                MessageBox.Show("This Username has been taken. Please try another.");
                return;
            }
            if (password == "" || password.Replace(" ", "") == "")
            {
                MessageBox.Show("Password cannot be empty.");
                return;
            }
            if (confirmPassword == "" || confirmPassword.Replace(" ", "") == "")
            {
                MessageBox.Show("Confirm password cannot be empty.");
                return;
            }
            if (password != confirmPassword)
            {
                MessageBox.Show("Password is not match.");
                return;
            }
            password = Md5Converter.encrypt(password);
            bool createAccount = Program.getDatabaseUtils().addNewUser(username, password, EnumUser.Student, StudentRegistrationForm.getStudentName(), StudentRegistrationForm.getGender(), StudentRegistrationForm.getDateOfBirth(),
                                                                       StudentRegistrationForm.getEmail(), StudentRegistrationForm.getContactNumber(), StudentRegistrationForm.getAddress());

            if (!createAccount)
            {
                MessageBox.Show("An error occurred! Failed to create account.");
            }
            else
            {
                hideAllComponents();
                StudentInformationForm.showAllComponents();
                StudentInformationForm.updateStudentInformation(username);
            }
        }