/// <summary> /// Assigns the team member productivity report. /// </summary> /// <param name="reportPresenter">The report presenter.</param> private void AssignTeamProductivityReport(ReportPresenter reportPresenter) { var month = reportPresenter.ReportFilter.DateFromRoleProductivity.HasValue ? reportPresenter.ReportFilter.DateFromRoleProductivity.Value.Month : DateTime.MinValue.Month; var year = reportPresenter.ReportFilter.DateFromRoleProductivity.HasValue ? reportPresenter.ReportFilter.DateFromRoleProductivity.Value.Year : DateTime.MinValue.Year; if (reportPresenter.ReportFilter.MonthForTMPR != null && reportPresenter.ReportFilter.YearForTMPR != null) { month = reportPresenter.ReportFilter.MonthForTMPR.Value; year = reportPresenter.ReportFilter.YearForTMPR.Value; reportPresenter.ReportFilter.DateFromRoleProductivity = new DateTime(year, month, 1); } var roleGroup = reportPresenter.SelectedMenuItem.Equals(ReportOption.TeamMemberProductivityHour.ToString()) == true ? reportPresenter.ReportFilter.SelectedRoleGroup.ToString() == "0" ? null : reportPresenter.ReportFilter.SelectedRoleGroup.ToString() : null; var roleType = reportPresenter.ReportFilter.SelectedRole <= 1 ? null : reportPresenter.RoleTypesList.FirstOrDefault(a => a.ID == reportPresenter.ReportFilter.SelectedRole).Name; var roleProductivityReportingData = this.reportService.RetrieveTeamProductivity(month, year, roleGroup, roleType, SessionData.Instance.UserInfo.Developer.DeveloperID); reportPresenter.AssignTeamProductivityData(roleProductivityReportingData); }