コード例 #1
0
        private void btnCheckKey_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(txtEmail.Text) || string.IsNullOrWhiteSpace(txtSecretKey.Text))
            {
                MessageBox.Show("Enter required information");
                return;
            }
            AccountBLL accountBLL = new AccountBLL();

            if (accountBLL.ForgotPassword(txtEmail.Text, txtSecretKey.Text))
            {
                panelSub.Visible  = true;
                txtEmail.ReadOnly = true;
            }
            else
            {
                MessageBox.Show("Incorrect information");
                if (panelSub.Visible == true)
                {
                    panelSub.Visible = false;
                }
            }
        }