Exemplo n.º 1
0
        private void sowEditing()
        {
            PasswordForm frm = new PasswordForm();

            if (frm.ShowDialog() != DialogResult.OK)
            {
                // The user canceled.
                this.Close();
            }
            frm.Close();
        }
Exemplo n.º 2
0
        private void button4_Click_1(object sender, EventArgs e)
        {
            PasswordForm frm = new PasswordForm();

            if (frm.ShowDialog() != DialogResult.OK)
            {
                // The user canceled.
                this.Close();
            }
            frm.Close();
        }
Exemplo n.º 3
0
 public void changePassword()
 {
     validator.validateOldPassword(form.getOldPwdTextBox().Text);
     validator.validateNewPassword(form.getNewPwdTextBox().Text);
     if (validator.isValid())
     {
         service.ChangePassword(null, user.serial, user.number, form.getOldPwdTextBox().Text, form.getNewPwdTextBox().Text);
         form.Close();
     }
     else
     {
         MessageBox.Show(validator.getErrorString(), "Ошибки ввода", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     validator.resetValues();
 }