Esempio n. 1
0
        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 (!CSMDataBaseControl.MatchingPassword(txtCurrentPassword.Text))
            {
                MessageBox.Show("Current Password is wrong.");
                txtCurrentPassword.Text = "";
                return;
            }

            CSMDataBaseControl.Updata_CSMPassword(txtNewPassword.Text);

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

            ((CSMMenu)MdiParent).RefreshPage();
            RefreshPage();
        }
 private void BtnChangeEmail_Click(object sender, EventArgs e)
 {
     CSMDataBaseControl.Updata_CSMName(txtNewName.Text);
     Close();
 }
Esempio n. 4
0
 private void BtnChangeProfile_Click(object sender, EventArgs e)
 {
     CSMDataBaseControl.Updata_CSMProfile(txtNewProfile.Text);
     Close();
 }