private void BtnOK_Click(object sender, EventArgs e)
        {
            int    ret          = 0;
            string strID        = TxtID.Text.Trim();
            string strPwdAnswer = TxtPwdAnswer.Text.Trim();

            SQLExecute excute = new SQLExecute();

            ret = excute.CompareUserIdentity(strID, strPwdAnswer);

            if (ret == 1)
            {
                MessageBox.Show("忘记密码成功!\n请输入新的信息", "提醒", MessageBoxButtons.OK, MessageBoxIcon.Information);

                FormReUserPwd FrmRePwd = new FormReUserPwd();

                //传递用户名
                FrmRePwd.TxtID.Text = TxtID.Text.Trim();

                FrmRePwd.Show();

                Close();
                //提示用户要干什么
                MessageBox.Show("请输入新的密码!", "提示",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);

                MessageBox.Show("除密码外其余若不想更改可为空!", "提示",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("忘记密码失败", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemplo n.º 2
0
        private void BtnOK_Click(object sender, EventArgs e)
        {
            if (TxtVttCode.Text.Trim().Equals(string.Empty))
            {
                MessageBox.Show("验证码不能为空!", "警告",
                                MessageBoxButtons.OK, MessageBoxIcon.Warning);

                return;
            }

            DialogResult DRret;

            DRret = MessageBox.Show("确认重置?", "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (DRret == DialogResult.Yes)
            {
                if (TxtVttCode.Text.Trim().Equals(PrivateStrVttCode))
                {
                    MessageBox.Show("验证码正确!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

                    FormReUserPwd FrmRePwd = new FormReUserPwd();

                    FrmRePwd.TxtID.Text = TxtID.Text.Trim();

                    FrmRePwd.Show();

                    Close();
                }
                else
                {
                    MessageBox.Show("验证码不正确!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            else
            {
            }
        }