コード例 #1
0
        /// <summary>
        /// Assigns the role productivity drilldown report.
        /// </summary>
        /// <param name="reportPresenter">The report presenter.</param>
        private void AssignRoleProductivityDrilldownReport(ReportPresenter reportPresenter)
        {
            var roleGroup = reportPresenter.SelectedMenuItem.Equals(ReportOption.RoleProductivityDrilldown.ToString()) == true ? reportPresenter.ReportFilter.SelectedRoleGroup.ToString() == "0" ? null : reportPresenter.ReportFilter.SelectedRoleGroup.ToString() : null;

            if (!string.IsNullOrWhiteSpace(reportPresenter.ReportFilter.SelectedRoleGroupName))
            {
                roleGroup = reportPresenter.RoleGroupList.FirstOrDefault(a => a.RoleGroup.Equals(reportPresenter.ReportFilter.SelectedRoleGroupName)).RoleGroupID.ToString();
                reportPresenter.ReportFilter.SelectedRoleGroup = Convert.ToInt32(roleGroup);
                reportPresenter.ReportFilter.DateFromRoleProductivity = (DateTime)reportPresenter.ReportFilter.DateFrom;
                reportPresenter.ReportFilter.DateToRoleProductivity = (DateTime)reportPresenter.ReportFilter.DateTo;
            }

            var startDate = reportPresenter.ReportFilter.DateFromRoleProductivity.HasValue ? reportPresenter.ReportFilter.DateFromRoleProductivity : DateTime.MinValue;
            var endDate = reportPresenter.ReportFilter.DateToRoleProductivity.HasValue ? reportPresenter.ReportFilter.DateToRoleProductivity : DateTime.MaxValue;

            var roleproductivityreportingdata = this.reportService.RetrieveRoleProductivityDrillDownData(startDate.Value.Month, endDate.Value.Month, startDate.Value.Year, endDate.Value.Year, roleGroup, SessionData.Instance.UserInfo.Developer.DeveloperID);

            reportPresenter.AssignRoleProductivityDrilldownData(roleproductivityreportingdata);
        }