Example #1
0
        private void DoLogion()
        {
            string strResult = "";
            bool   blFlag    = false;

            blFlag = HiBLL.DoLogin(this.txtUserCode.Text, this.txtPassword.Text, out strResult);
            if (!blFlag)
            {
                if (_LoginCount < 4)
                {
                    MsgBox.ShowWarning("安全问题错误[" + strResult + "]\r\n你还可以尝试" + Convert.ToString(4 - _LoginCount) + "次。");
                }
                if (_LoginCount >= 4)
                {
                    MsgBox.ShowWarning("多次登录失败,系统自动退出\r\n请联系系统管理员帮助。");
                    this.Close();
                }
                _LoginCount++;
            }
            else
            {
                Utils.IniWrite("Option", "UserCode", this.txtUserCode.Text, Hi.Common.AppSetting.IniFileName);
                this.DialogResult = DialogResult.OK;
            }
            this.btnSumbit.Enabled = true;
        }
Example #2
0
        private void DoLogion()
        {
            string strResult = "";
            bool   blFlag    = false;

            blFlag = HiBLL.DoLogin(this.txtUserCode.Text, this.txtPassword.Text, out strResult);
            if (!blFlag)
            {
                if (_LoginCount < 4)
                {
                    MsgBox.ShowWarning("安全问题错误[" + strResult + "]\r\n你还可以尝试" + Convert.ToString(4 - _LoginCount) + "次。");
                }
                if (_LoginCount >= 4)
                {
                    MsgBox.ShowWarning("多次登录失败,系统自动退出\r\n请联系系统管理员帮助。");
                    this.Close();
                }
                _LoginCount++;
            }
            else
            {
                this.DialogResult = DialogResult.OK;
            }
        }