コード例 #1
0
        /// <summary>
        /// Assigns the project dashboard.
        /// </summary>
        /// <param name="presenter">The presenter.</param>
        /// <param name="projectPortalId">The project portal identifier.</param>
        private void AssignProjectDashboardDetails(ProjectDashboardPresenter presenter, int projectPortalId)
        {
            presenter.DateTo = DateTimeHelper.RetrieveCurrentDateTime();
            var defaultProjectStartDate = presenter.ProjectPortalDetail != null ? (presenter.ProjectPortalDetail.FirstTimesheetDate.HasValue ? presenter.ProjectPortalDetail.FirstTimesheetDate.Value : presenter.DateTo.AddMonths(-1)) : presenter.DateTo.AddMonths(-1);
            presenter.LastTwoMonthStartDate = presenter.DateTo.AddMonths(-2);
            var dateFrom = presenter.ProjectPortalDetail != null ? (presenter.ProjectPortalDetail.StartDate.HasValue ? presenter.ProjectPortalDetail.StartDate.Value : defaultProjectStartDate) : defaultProjectStartDate;
            presenter.DateFrom = dateFrom;
            presenter.AssignProjectPortalEstimatedVsConsumedHours(this.projectHourReportService.RetrieveWeeklyProjectHourBurnDown(dateFrom, presenter.DateTo, projectPortalId));
            presenter.AssignProjectPortalDefectInfo(this.projectService.RetrieveProjectPortalDefectInfo(projectPortalId, SessionData.Instance.UserInfo.Developer.DeveloperID, dateFrom, presenter.DateTo));
            presenter.AssignProjectPortalDefectInfoForLastTwoMonths(this.projectService.RetrieveProjectPortalDefectInfo(projectPortalId, SessionData.Instance.UserInfo.Developer.DeveloperID, presenter.LastTwoMonthStartDate, presenter.DateTo));

            IList<byte> releaseTypes = new List<byte>();
            releaseTypes.Add(UatReleaseType);
            releaseTypes.Add(ProductionReleaseType);

            IList<int> productIds = new List<int>();
            productIds.Add(projectPortalId);

            presenter.AssignReleaseItemsList(presenter.DateTo, this.releaseService.RetrieveList(releaseTypes, productIds, presenter.DateTo, null, SessionData.Instance.UserInfo.Developer.DeveloperID));

            presenter.AssignProjectComplianceList(this.projectService.RetrieveProjectComplianceInfo(projectPortalId, SessionData.Instance.UserInfo.Developer.DeveloperID, null));
        }