/// <summary>
        /// Refreshes the project dashboard history details.
        /// </summary>
        /// <param name="presenter">The presenter.</param>
        /// <param name="projectPortalId">The project portal id.</param>
        /// <returns>
        /// partial view for
        /// </returns>
        public ActionResult RefreshProjectDashboardHistoryDetails(ProjectDashboardPresenter presenter, string projectPortalId)
        {
            if (presenter != null && !string.IsNullOrEmpty(presenter.SelectedReleaseTypeIds))
            {
                presenter.ProjectPortalProjectSummaryList.ForEach(DecodeSummaryNewValue);
                IList<int> selectedReleaseTypeIds = presenter.SelectedReleaseTypeIds.Split(',').Select(releaseType => Convert.ToInt32(releaseType, CultureInfo.CurrentCulture)).ToList();
                presenter.AssignSelectedReleaseTypes(presenter.ReleaseTypeList.Where(releaseType => selectedReleaseTypeIds.Contains(releaseType.ID)).ToList());
                presenter.Offset = DefaultOffset;
                presenter.DateTo = DateTimeExtensions.RetrieveTodayEndTime(presenter.DateTo);
                presenter.AssignProjectPortalHistoryList(this.projectService.RetrieveProjectPortalHistoryInfo(presenter.SelectedReleaseTypeIds, Convert.ToInt32(projectPortalId, CultureInfo.CurrentCulture), presenter.DateFrom, presenter.DateTo, presenter.Offset, ProjectDashboardPresenter.NumberOfRecord, SessionData.Instance.UserInfo.Developer.DeveloperID));
            }

            return this.PartialView(ProjectHistoryPartialView, presenter);
        }
        /// <summary>
        /// Shows the more history.
        /// </summary>
        /// <param name="presenter">The presenter.</param>
        /// <param name="projectPortalId">The project portal id.</param>
        /// <returns>history rows</returns>
        public ActionResult ShowMoreHistory(ProjectDashboardPresenter presenter, string projectPortalId)
        {
            if (presenter != null)
            {
                presenter.ProjectPortalProjectSummaryList.ForEach(DecodeSummaryNewValue);
                presenter.DateTo = DateTimeExtensions.RetrieveTodayEndTime(presenter.DateTo);
                presenter.AssignProjectPortalHistoryList(this.projectService.RetrieveProjectPortalHistoryInfo(presenter.SelectedReleaseTypeIds, Convert.ToInt32(projectPortalId, CultureInfo.CurrentCulture), presenter.DateFrom, presenter.DateTo, presenter.Offset, ProjectDashboardPresenter.NumberOfRecord, SessionData.Instance.UserInfo.Developer.DeveloperID));
            }

            return this.PartialView(ProjectHistoryContentsPartialView, presenter);
        }
        /// <summary>
        /// Assigns the project portal history.
        /// </summary>
        /// <param name="presenter">The presenter.</param>
        /// <param name="projectPortalId">The project portal id.</param>
        /// <param name="historyTypeIds">The history type ids.</param>
        /// <param name="fromDate">From date.</param>
        /// <param name="toDate">To date.</param>
        private void AssignProjectPortalHistory(ProjectDashboardPresenter presenter, int projectPortalId, string historyTypeIds, string fromDate, string toDate)
        {
            presenter.DateFrom = !string.IsNullOrEmpty(fromDate) ? Convert.ToDateTime(fromDate) : DateTimeHelper.RetrieveCurrentDate().AddMonths(-1);
            presenter.DateTo = !string.IsNullOrEmpty(toDate) ? Convert.ToDateTime(toDate) : DateTimeHelper.RetrieveCurrentDateTime();
            var date = presenter.DateTo;
            date = new DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second);

            if (SessionData.Instance.UserInfo != null && SessionData.Instance.UserInfo.Developer != null)
            {
                presenter.AssignProjectPortalHistoryList(this.projectService.RetrieveProjectPortalHistoryInfo(null, projectPortalId, presenter.DateFrom, date, presenter.Offset, ProjectDashboardPresenter.NumberOfRecord, SessionData.Instance.UserInfo.Developer.DeveloperID));
                presenter.AssignProjectPortalProjectSummaryList(this.projectService.RetrieveProjectPortalProjectSummaryList(projectPortalId, null, null, presenter.SummaryOffset, ProjectDashboardPresenter.SummaryNumberOfRecord, SessionData.Instance.UserInfo.Developer.DeveloperID));
            }

            presenter.AssignReleaseTypes(this.lookupService.RetrieveHistoryEntity(null, null, SessionData.Instance.UserInfo.Developer.DeveloperID));

            if (!string.IsNullOrEmpty(historyTypeIds))
            {
                var selectedhistoryTypeIds = historyTypeIds.Split(',').Select(s => Convert.ToInt32(s, CultureInfo.CurrentCulture)).ToList();
                presenter.AssignSelectedReleaseTypes(presenter.ReleaseTypeList.Where(releaseTypeItem => selectedhistoryTypeIds.Contains(releaseTypeItem.ID)).ToList());
            }
            else
            {
                presenter.AssignSelectedReleaseTypes(presenter.ReleaseTypeList);
            }
        }