public UserLoginInterface(string userId, string userPw) { this.Ip = string.Empty; this.PreWorkId = -1; this.ModuleId = string.Empty; this.userId = string.Empty; this.userPw = string.Empty; this.userId = userId; this.userPw = userPw; this.loginUserInfo = new LoginUserInfo(userId, userPw); this.loginOnlieUserInfo = new LoginOnlieUserInfo(userId); }
private bool IsDbExistUser(int workId) { LoginOnlieUserInfo info = new LoginOnlieUserInfo(workId); return info.IsExistUser(); }
private void Pulse() { TimeSpan span = (TimeSpan) (DateTime.Now - this._OnlineUserInfo.SynDbUserTime); double totalMinutes = span.TotalMinutes; if (totalMinutes >= 6.0) { this._RemotingState.IsOutTime = true; } if (!this._RemotingState.IsOutTime && (totalMinutes >= 1.0)) { try { int num2 = new LoginOnlieUserInfo(this._OnlineUserInfo.WorkId).UpdateUserOnline(); if (!this._RemotingState.IsConnected) { this._RemotingState.IsConnected = true; this._RemotingState.DataBaseInfo = "数据库已经连接上!"; } if (num2 == 1) { this._OnlineUserInfo.SynDbUserTime = DateTime.Now; } else { this._RemotingState.IsOutTime = true; } } catch (Exception exception) { this._RemotingState.IsConnected = false; this._RemotingState.DataBaseInfo = "数据库连接出错,详细信息:" + exception.Message; Thread.Sleep(0x2710); } } }