Exemplo n.º 1
0
        private void btValider_Click(object sender, EventArgs e)
        {
            btValider.Visible = false;
            DialogResult dr = new DialogResult();

            dr = MessageBox.Show(Properties.Resources.MsgBoxConfirmChangementPasswordText, Properties.Resources.MsgBoxConfirmChangementPasswordTitre, MessageBoxButtons.YesNo, MessageBoxIcon.Information);
            if (dr == DialogResult.Yes && (txtNewPwd.TextLength != txtConfirmNewPwd.TextLength) || !(string.IsNullOrWhiteSpace(txtNewPwd.Text) || string.IsNullOrWhiteSpace(txtConfirmNewPwd.Text)))
            {
                Outil.ModifierPassword(Accueil.CurrentUsers.Id, txtNewPwd.Text);
                btValider.Visible = true;
                Close();
            }
        }