コード例 #1
0
 /// <summary>
 /// Sets the report details.
 /// </summary>
 /// <param name="presenter">The presenter.</param>
 private void SetReportDetails(ProjectDashboardPresenter presenter)
 {
     if (presenter.SelectedMenuItem.Equals(ReportOption.ProjectHoursAnalysis.ToString()) || presenter.SelectedMenuItem.Equals(ReportOption.ProjectHoursAnalysisDrillDown.ToString()))
     {
         presenter.AssignDashboardProjectHourAnalysisReportList(this.projectHourReportService.RetrieveProjectHourAnalysis(presenter.ReportFilter.SelectedProject, presenter.ReportFilter.DateFrom, presenter.ReportFilter.DateTo));
     }
     else if (presenter.SelectedMenuItem.Equals(ReportOption.ProjectTeamMemberAllocation.ToString()))
     {
         this.ProjectTeamMemberAllocationReport(presenter);
     }
     else if (presenter.SelectedMenuItem.Equals(ReportOption.WeeklyProjectHourBurndown.ToString()))
     {
         this.WeeklyProjectHourBurnDownReport(presenter);
     }
     else if (presenter.SelectedMenuItem.Equals(ReportOption.ProjectHourBreakdown.ToString()))
     {
         this.ProjectHourBreakdownReport(presenter);
     }
 }
コード例 #2
0
        /// <summary>
        /// Retrieves the project report data.
        /// </summary>
        /// <param name="project">The project.</param>
        /// <param name="presenter">The presenter.</param>
        /// <param name="projectPortalId">The project portal identifier.</param>
        private void RetrieveProjectReportData(Project project, ProjectDashboardPresenter presenter, int projectPortalId)
        {
            presenter.ReportFilter.SelectedProject = projectPortalId;

            var defaultProjectStartDate = presenter.ReportFilter.DateTo.RetrievePreviousMonthDate();
            var startDate = project != null ? (project.StartDate.HasValue ? project.StartDate.Value : defaultProjectStartDate) : defaultProjectStartDate;
            presenter.ReportFilter.DateFrom = Convert.ToDateTime(startDate, CultureInfo.CurrentCulture);
            presenter.ReportFilterXml = HttpContext.Server.HtmlEncode(SerializeObject(presenter.ReportFilter, typeof(ReportFilter)));
            presenter.AssignDashboardProjectHourAnalysisReportList(this.projectHourReportService.RetrieveProjectHourAnalysis(presenter.ReportFilter.SelectedProject, presenter.ReportFilter.DateFrom, presenter.ReportFilter.DateTo));
        }