From 8a829f00d0582a32c7bef960cab5c6fd855c5ea5 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 31 十月 2024 11:05:23 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
BLL/公用模块/FrmLogin.cs | 48 +++++++++++++++++++++++++++++-------------------
1 files changed, 29 insertions(+), 19 deletions(-)
diff --git "a/BLL/\345\205\254\347\224\250\346\250\241\345\235\227/FrmLogin.cs" "b/BLL/\345\205\254\347\224\250\346\250\241\345\235\227/FrmLogin.cs"
index 494c221..c435ebc 100644
--- "a/BLL/\345\205\254\347\224\250\346\250\241\345\235\227/FrmLogin.cs"
+++ "b/BLL/\345\205\254\347\224\250\346\250\241\345\235\227/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");
}
}
-
}
}
}
\ No newline at end of file
--
Gitblit v1.9.1