/// <summary> /// Assigns the yearly leave roster. /// </summary> /// <param name="reportPresenter">The report presenter.</param> private void AssignYearlyLeaveRoster(ReportPresenter reportPresenter) { reportPresenter.ReportFilter.DateFromYear = reportPresenter.ReportFilter.DateFromYear.RetrieveCurrentYearStartDate(); var dateFromYear = reportPresenter.ReportFilter.DateFromYear.Year; var currentDate = DateTimeHelper.RetrieveCurrentDate(); var currentYear = currentDate.Year; var currentYearEndDate = reportPresenter.ReportFilter.DateFromYear.RetrieveCurrentYearEndDate(); reportPresenter.ReportFilter.DateToYear = dateFromYear > currentYear ? reportPresenter.ReportFilter.DateFromYear : dateFromYear < currentYear ? currentYearEndDate : currentDate; AssignSelectedTeamDevelopersIds(reportPresenter); reportPresenter.AssignYearlyLeaveRoster(this.reportService.RetrieveYearlyLeaveRoster(dateFromYear, reportPresenter.SelectedTeamMembersIds, SessionData.Instance.UserInfo.Developer.DeveloperID)); }