Пример #1
0
        private void btnResetPass_Click(object sender, EventArgs e)
        {
            EncryptBLL encrypt = new EncryptBLL();
            LoginBLL   lg      = new LoginBLL();
            DicBLL     dic     = new DicBLL();
            ResetBLL   rs      = new ResetBLL();
            string     user    = txtResetPass.Text;
            string     pass    = encrypt.EncodeSHA1(dic.defaultPass());

            if (lg.isvaildEmail(user) == true)
            {
                if (lg.isvaildAccount(user) == true)
                {
                    if (rs.successUpdate(user, pass) == true)
                    {
                        MessageBox.Show(dic.successResetMessage());
                    }
                    else
                    {
                        MessageBox.Show(dic.errorResetMessage("error"));
                    }
                }
                else
                {
                    MessageBox.Show(dic.errorResetMessage("sai user"));
                }
            }
            else
            {
                MessageBox.Show(dic.errorResetMessage("sai email"));
            }
        }
Пример #2
0
        public ResetBLL ConstructorTest()
        {
            ResetBLL target = new ResetBLL();

            return(target);
            // TODO: add assertions to method ResetBLLTest.ConstructorTest()
        }
Пример #3
0
        public void successUpdateTest01()
        {
            ResetBLL resetBLL;
            bool     b;

            resetBLL = new ResetBLL();
            b        = this.successUpdateTest(resetBLL, (string)null, (string)null);
        }
Пример #4
0
        public bool successUpdateTest(
            [PexAssumeUnderTest] ResetBLL target,
            string user,
            string pass
            )
        {
            bool result = target.successUpdate(user, pass);

            return(result);
            // TODO: add assertions to method ResetBLLTest.successUpdateTest(ResetBLL, String, String)
        }