public static LogonsList Convert(HAP.Data.Tracker.LogonsList ll) { LogonsList l = new LogonsList(); l.UserType = ll.UserType; l.OverrideCode = ll.OverrideCode; l.MaxLogons = ll.MaxLogons; l.Logons = trackerlogentrysmall.Convert(ll.Logons); return(l); }
public LogonsList Poll(string Username, string Computer, string DomainName) { LogonsList ll = new LogonsList(); if (hapConfig.Current.Tracker.Provider == "XML") { ll.Logons = trackerlogentrysmall.Convert(xml.Poll(Username, Computer, DomainName)); } else { ll.Logons = trackerlogentrysmall.Convert(HAP.Data.SQL.Tracker.Poll(Username, Computer, DomainName)); } ll.OverrideCode = hapConfig.Current.Tracker.OverrideCode; ll.MaxLogons = isAdmin(Username) ? 0 : isStudent(Username) ? hapConfig.Current.Tracker.MaxStudentLogons : hapConfig.Current.Tracker.MaxStaffLogons; ll.UserType = isAdmin(Username) ? UT.Admin : isStudent(Username) ? UT.Student : UT.Staff; return(ll); }