public static UserReportLine Obtain(LogLine line) { UserReportLine toReturn = new UserReportLine(); toReturn.ID = line.ID; toReturn.InDate = line.InDate; toReturn.OutDate = line.OutDate; toReturn.IP = line.IP; toReturn.Company = line.Company; return(toReturn); }
public static UserReportLine GetHeader() { if (_header == null) { _header = new UserReportLine(); _header.ID = ID_HEADER; _header.InDate = INDATE_HEADER; _header.OutDate = OUTDATE_HEADER; _header.IP = IP_HEADER; _header.Company = COMPANY_HEADER; } return(_header); }
public UserReport(List <LogLine> logLineList) { DateTime setTime = new DateTime(2017, 7, 6, 00, 00, 00); this.logLineList = logLineList; DateTime startTime = setTime.AddHours(-24); reportList = new List <IReportLine> (); reportList.Add(UserReportLine.GetHeader()); foreach (LogLine line in logLineList) { if (ll.OutDate <= startTime || ll.OutDate >= setTime) { continue; } reportList.Add(UserReportLine.Obtain(line)); } // reportList = logLineList.FindAll(ll => ); }