Esempio n. 1
0
        void BtnLogin()
        {
            if (db.strCon() == "")
                MessageBox.Show("数据库连接错误!请检查!");
            string UserLogin = txtlogin.Text.Trim();
            string UserPwd = UserPublicClass.MD5(txtpwd.Text.Trim());
            string ErrorMsg = CheckVaile(UserLogin, UserPwd);
            if (ErrorMsg != "")
                MessageBox.Show(ErrorMsg);
            else
            {

                HZLMain m = new HZLMain();
                m.Show();
                this.Hide();
            }
        }
Esempio n. 2
0
        void BtnLogin()
        {
            if (db.strCon() == "")
            {
                MessageBox.Show("数据库连接错误!请检查!");
            }
            string UserLogin = txtlogin.Text.Trim();
            string UserPwd   = UserPublicClass.MD5(txtpwd.Text.Trim());
            string ErrorMsg  = CheckVaile(UserLogin, UserPwd);

            if (ErrorMsg != "")
            {
                MessageBox.Show(ErrorMsg);
            }
            else
            {
                HZLMain m = new HZLMain();
                m.Show();
                this.Hide();
            }
        }