| | |
| | | |
| | | private void btnOK_Click(object sender, EventArgs e) //Lock |
| | | { |
| | | |
| | | if (AllowLogin() != true) |
| | | return; |
| | | DataSet ds = null; |
| | |
| | | { |
| | | textBox1.Visible = true; |
| | | button1.Visible = true; |
| | | textBox1.Focus(); |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | 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; |
| | | } |
| | | // |
| | |
| | | |
| | | if (AllowLogin() != true) |
| | | return; |
| | | DataSet ds = null; |
| | | //DataSet ds = null; |
| | | ClsCNmaster oCn = new ClsCNmaster(); |
| | | ClsCN oCnLoc = new ClsCN(); |
| | | string sDataBase; |
| | |
| | | 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; |
| | |
| | | ClsIni.WriteIni("UserInfo", "Remember", "0", DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |