private void BtnChangeLanguage_Click(object sender, EventArgs e)
        {
            StaffDataBaseControl.Updata_isEnglish(!StaffDataBaseControl.isEnglish);

            ((StaffMenu)MdiParent).RefreshPage();
            RefreshPage();
        }
        private void BtnChangePassword_Click(object sender, EventArgs e)
        {
            if (txtCurrentPassword.Text == "")
            {
                MessageBox.Show("Current Password can not be empty.");
                return;
            }

            if (!FormatChecking.Password(txtNewPassword.Text))
            {
                txtNewPassword.Text      = "";
                txtNewPasswordAgain.Text = "";
                return;
            }

            if (txtNewPassword.Text != txtNewPasswordAgain.Text)
            {
                MessageBox.Show("New password is not equal to new password again.");
                txtNewPassword.Text      = "";
                txtNewPasswordAgain.Text = "";
                return;
            }

            if (!StaffDataBaseControl.MatchingPassword(txtCurrentPassword.Text))
            {
                MessageBox.Show("Current Password is wrong.");
                txtCurrentPassword.Text = "";
                return;
            }

            StaffDataBaseControl.Updata_StaffPassword(txtNewPassword.Text);

            Close();
        }
Ejemplo n.º 3
0
 private void BtnChangeEmail_Click(object sender, EventArgs e)
 {
     StaffDataBaseControl.Updata_StaffEmail(txtNewEmail.Text);
     Close();
 }
Ejemplo n.º 4
0
 private void BtnChangeProfile_Click(object sender, EventArgs e)
 {
     StaffDataBaseControl.Updata_StaffProfile(txtNewProfile.Text);
     Close();
 }