/// <summary> /// 记录网络报障的日志信息 /// </summary> /// <param name="logintime">登录时间</param> /// <param name="loginip">登录IP</param> /// <param name="username">登录使用的用户名</param> /// <param name="Url">登录使用的url地址</param> /// <param name="result">登录结果</param> public static void AddNesWebReportLog( string username, bool result) { Getloginfor gli = new Getloginfor(); //WebReportLogOpera wro = new WebReportLogOpera(); WebReportLog wrl = new WebReportLog(); wrl.Logintime = gli.GetSystemDateTime(); wrl.Loginip = gli.GetUserIP(); wrl.Username = username; wrl.Url = gli.GetUrl(); wrl.Result = result; wro.AddNewLog(wrl); }
public bool CheckUserIsOnline(string Username) { Getloginfor glg=new Getloginfor(); string LastLoginIP=glg.GetUserIP().ToString().Trim(); if (upo.CheckUserIsOline(Username, LastLoginIP).Rows.Count > 0 && upo.CheckUserIsOline(Username, LastLoginIP).Rows[0][0].ToString().Trim() != "") { return true; } else { return false; } }