public StaffInfo[] GetStaff() { StaffInfo[] staff = new StaffInfo[m_StaffInfo.Count]; int index = 0; foreach (StaffInfo staffInfo in m_StaffInfo.Values) { staff[index++] = staffInfo; } return(staff); }
public StaffInfo GetStaffInfo( string account ) { lock ( RenderLock ) { if ( account == null || account.Length == 0 ) return null; StaffInfo info = m_StaffInfo[account] as StaffInfo; if ( info == null ) m_StaffInfo[account] = info = new StaffInfo( account ); return info; } }
public StaffInfo GetStaffInfo(string account) { lock (RenderLock) { if (account == null || account.Length == 0) { return(null); } StaffInfo info = m_StaffInfo[account] as StaffInfo; if (info == null) { m_StaffInfo[account] = info = new StaffInfo(account); } return(info); } }
private BarGraph GraphHourlyPages(StaffInfo staff) { return(GraphHourlyPages(staff.Pages, PageResolution.Handled, "Average pages handled by " + staff.Display, "graphs_" + staff.Account.ToLower() + "_avg")); }
public static int GetPageCount(StaffInfo staff, DateTime min, DateTime max) { return(GetPageCount(staff.Pages, PageResolution.Handled, min, max)); }
private PieChart[] ChartTotalPages( StaffInfo[] staff, TimeSpan ts, string title, string fname ) { DateTime max = DateTime.UtcNow; DateTime min = max - ts; PieChart staffChart = new PieChart( title + " Staff Chart", fname + "_staff", true ); int other = 0; for ( int i = 0; i < staff.Length; ++i ) { int count = GetPageCount( staff[i], min, max ); if ( i < 12 && count > 0 ) staffChart.Items.Add( staff[i].Display, count ); else other += count; } if ( other > 0 ) staffChart.Items.Add( "Other", other ); PieChart resChart = new PieChart( title + " Resolutions", fname + "_resol", true ); int countTotal = GetPageCount( m_Pages, PageResolution.None, min, max ); int countHandled = GetPageCount( m_Pages, PageResolution.Handled, min, max ); int countDeleted = GetPageCount( m_Pages, PageResolution.Deleted, min, max ); int countCanceled = GetPageCount( m_Pages, PageResolution.Canceled, min, max ); int countLogged = GetPageCount( m_Pages, PageResolution.Logged, min, max ); int countUnres = countTotal - ( countHandled + countDeleted + countCanceled + countLogged ); resChart.Items.Add( "Handled", countHandled ); resChart.Items.Add( "Deleted", countDeleted ); resChart.Items.Add( "Canceled", countCanceled ); resChart.Items.Add( "Logged Out", countLogged ); resChart.Items.Add( "Unresolved", countUnres ); return new PieChart[]{ staffChart, resChart }; }
private Report ReportTotalPages( StaffInfo[] staff, TimeSpan ts, string title ) { DateTime max = DateTime.UtcNow; DateTime min = max - ts; Report report = new Report( title + " Staff Report", "400" ); report.Columns.Add( "65%", "left", "Staff Name" ); report.Columns.Add( "35%", "center", "Page Count" ); for ( int i = 0; i < staff.Length; ++i ) report.Items.Add( staff[i].Display, GetPageCount( staff[i], min, max ) ); return report; }
private BarGraph GraphHourlyPages( StaffInfo staff ) { return GraphHourlyPages( staff.Pages, PageResolution.Handled, "Average pages handled by " + staff.Display, "graphs_" + staff.Account.ToLower() + "_avg" ); }
public static int GetPageCount( StaffInfo staff, DateTime min, DateTime max ) { return GetPageCount( staff.Pages, PageResolution.Handled, min, max ); }
public StaffInfo[] GetStaff() { StaffInfo[] staff = new StaffInfo[m_StaffInfo.Count]; int index = 0; foreach ( StaffInfo staffInfo in m_StaffInfo.Values ) staff[index++] = staffInfo; return staff; }