private void funChkLogInPw(string strUserID) { string sSQL = ""; DbDataReader dbRS = null; string sDTime = ""; int iTime = 50; sSQL = "SELECT * FROM USER_MST WHERE USER_ID='" + strUserID + "'"; if (clsDB.FunRsSql(sSQL, ref dbRS)) { while (dbRS.Read()) { sDTime = dbRS["TRN_DATE"].ToString().Trim(); } dbRS.Close(); } if (sDTime.Length != 0) { iTime = clsTool.DateDiff_Days((sDTime)); //日 } //V.0.1.9 密碼過期前十天提醒使用者修改密碼 if (iTime >= 20 && iTime < 30) { clsMSG.ShowInformationMsg("密碼剩餘 " + (30 - iTime) + " 天即過期,請前往修改密碼。"); } if (iTime >= 30) { //密碼修改 clsMSG.ShowInformationMsg("密碼超過30天未變更"); frmChgPwd frmPChgPwd = new frmChgPwd(); frmPChgPwd.ShowDialog(); } }
private void mniChangePwd_Click(object sender, EventArgs e) { if (clsASRS.gstrLoginUser == "") { return; } ; frmChgPwd frmChgPwd_From = new frmChgPwd(); frmChgPwd_From.ShowDialog(); }
private void tsbS_ChgPwd_Click(object sender, EventArgs e) { SubMenuCls(); //Menu Clear SubClsForm(); //密碼修改 frmChgPwd frmPChgPwd = new frmChgPwd(); frmPChgPwd.ShowDialog(); if (clsDB.FunOpenDB() == false) // Open Database { clsMSG.ShowErrMsg(clsMSG.MSG.OPEN_DB_NG); Application.Exit(); } SubAsrsLogin(); //登入帳號/密碼 SubGetAuthoirty(); //Get Authority clsDB.FunClsDB(); }