/// <summary> /// 检测用户是否可以登陆 /// </summary> /// <param name="UserKey">用户UserKey</param> /// <returns>true可以登陆,false不可登陆</returns> public static bool CheckDisableLoginUser(string UserKey) { bool rBool = false; LoginErrorUser LUser = _LoginErrorList.GetValue(UserKey); if (LUser == null) { LUser = new LoginErrorUser(); LUser.U_Guid = UserKey; LUser.U_Type = true; LUser.ErrorCount = 1; LUser.U_Name = UserKey; _LoginErrorList.InsertUser(UserKey, LUser); rBool = true; } else { if (LUser.ErrorCount < FrameSystemInfo.GetSystemInfoTable.S_SystemConfigData.C_LoginErrorMaxNum) { LUser.ErrorCount++; return(true); } else { _LoginErrorList.Access(UserKey); } } return(rBool); }
/// <summary> /// 获得用户登陆出错次数 /// </summary> public static int GetLoginUserError(string UserKey) { int errorcount = 0; LoginErrorUser LUser = _LoginErrorList.GetValue(UserKey); if (LUser != null) { errorcount = LUser.ErrorCount; } return(errorcount); }