public IList<object[]> BuildReport(ReportType type, ReportFilter filter) { filter = (ReportFilter)filter.Clone(); switch (type) { case ReportType.MilestonesExpired: case ReportType.MilestonesNearest: return BuildMilestonesReport(filter); case ReportType.UsersWithoutActiveTasks: return BuildUsersWithoutActiveTasks(filter); case ReportType.ProjectsWithoutActiveMilestones: return BuildProjectsWithoutActiveMilestones(filter); case ReportType.ProjectsWithoutActiveTasks: return BuildProjectsWithoutActiveTasks(filter); case ReportType.UsersActivity: throw new NotImplementedException(); case ReportType.UsersWorkload: return BuildUsersWorkload(filter); case ReportType.ProjectsList: return BuildProjectsListReport(filter); case ReportType.TasksByUsers: case ReportType.TasksByProjects: case ReportType.TasksExpired: return BuildTasksListReport(filter); case ReportType.TimeSpend: return BuildTimeSpendReport(filter); default: throw new ArgumentOutOfRangeException("reportType"); } }
public IList<object[]> BuildProjectsListReport(ReportFilter filter) { filter = (ReportFilter)filter.Clone(); return SelectOnlyCanReadProjects(reportDao.BuildProjectListReport(filter)); }