yusijie
2022-11-25 af74d787372fe679d9301cad7178b3ad6acb31cb
BLL/¹«ÓÃÄ£¿é/FrmLogin.cs
@@ -100,6 +100,7 @@
        private void btnOK_Click(object sender, EventArgs e)  //Lock
        {
            if (AllowLogin() != true)
                return;
            DataSet ds = null;
@@ -271,6 +272,7 @@
            {
                textBox1.Visible = true;
                button1.Visible = true;
                textBox1.Focus();
            }
            else
            {
@@ -455,12 +457,21 @@
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
        }
        private void textBox1_KeyDown(object sender, KeyEventArgs e)
        {
            string HPassWord = textBox1.Text.Trim().ToString();
            if (HPassWord.Length < 10)
            {
                return;
            }
            //MessageBox.Show(HPassWord);
            //演示视频用,平时屏蔽掉
            if (HPassWord.Trim() == "")
            if (HPassWord.Trim() == "3012460306-1" || HPassWord.Contains("3012460306-1") == true)
            {
                MessageBox.Show("您刷的员工卡,没有经过技能的培训,不能在本工序上岗!");
                MessageBox.Show("您刷的员工卡,没有经过技能的培训,不能在本工站上岗!");
                return;
            }
            //
@@ -480,7 +491,7 @@
                if (AllowLogin() != true)
                    return;
                DataSet ds = null;
                //DataSet ds = null;
                ClsCNmaster oCn = new ClsCNmaster();
                ClsCN oCnLoc = new ClsCN();
                string sDataBase;
@@ -493,23 +504,23 @@
                ClsIni.WriteIni("K3Erp", "DataBase", sDataBase_K3.Trim(), DBUtility.ClsPub.AppPath + @"/HXERP.ini");
                DAL.ClsUser oUser = new DAL.ClsUser();
                ds = oUser.CheckCzymc(cmbUser.Text.Trim(), textBox1.Text.Trim());
                if (ds == null)
                {
                    MessageBox.Show("选择的帐套不存在!", "提示");
                    return;
                }
                if (ds.Tables[0].Rows.Count > 0)
                {
                    ClsPub.CurUserID = ds.Tables[0].Rows[0]["Czybm"].ToString();
                //ds = oUser.CheckCzymc(cmbUser.Text.Trim(), textBox1.Text.Trim());
                //if (ds == null)
                //{
                //    MessageBox.Show("选择的帐套不存在!", "提示");
                //    return;
                //}
                //if (ds.Tables[0].Rows.Count > 0)
                //{
                    ClsPub.CurUserID = DSet.Tables[0].Rows[0]["Czybm"].ToString();
                    this.Close();
                    isOk = true;
                }
                else
                {
                    MessageBox.Show("错误的用户密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                //}
                //else
                //{
                //    MessageBox.Show("错误的用户密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                //    return;
                //}
                //得到当前会计期间
                int sYear = 0;
                int sPeriod = 0;
@@ -562,7 +573,6 @@
                    ClsIni.WriteIni("UserInfo", "Remember", "0", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
                }
            }
        }
    }
}