Ejemplo n.º 1
0
        public ProjectTimelineUpdateEvent(ProjectUpdateBatch projectUpdateBatch)
        {
            var approvedProjectUpdateHistory = projectUpdateBatch.ProjectUpdateHistories.First(x => x.ProjectUpdateState == ProjectUpdateState.Approved);

            Date        = approvedProjectUpdateHistory.TransitionDate;
            DateDisplay = Date.ToString("MMM dd, yyyy");
            FiscalYear  = FirmaDateUtilities.CalculateFiscalYearForTenant(Date);
            Quarter     = (Quarter)FirmaDateUtilities.CalculateQuarterForTenant(Date);
            ProjectTimelineEventType       = ProjectTimelineEventType.Update;
            TimelineEventTypeDisplayName   = "Update";
            TimelineEventPersonDisplayName = approvedProjectUpdateHistory.UpdatePerson.GetPersonDisplayNameWithContactTypesListForProject(projectUpdateBatch.Project);
            ProjectTimelineSide            = ProjectTimelineSide.Left;
            EditButton   = new HtmlString(string.Empty);
            DeleteButton = new HtmlString(string.Empty);
            ShowDetailsLinkHtmlString = ProjectTimeline.MakeProjectUpdateDetailsLinkButton(projectUpdateBatch);
        }
Ejemplo n.º 2
0
        public ProjectTimelineProjectStatusChangeEvent(ProjectProjectStatus projectProjectStatus, bool canEditProjectProjectStatus, bool canEditFinalStatusReport)
        {
            Date        = projectProjectStatus.ProjectProjectStatusUpdateDate;
            DateDisplay = Date.ToString("MMM dd, yyyy");
            FiscalYear  = FirmaDateUtilities.CalculateFiscalYearForTenant(Date);
            Quarter     = (Quarter)FirmaDateUtilities.CalculateQuarterForTenant(Date);
            ProjectTimelineEventType       = ProjectTimelineEventType.ProjectStatusChange;
            TimelineEventTypeDisplayName   = projectProjectStatus.IsFinalStatusUpdate ? "Final Status Update" : "Status Updated";
            TimelineEventPersonDisplayName = projectProjectStatus.ProjectProjectStatusCreatePerson.GetPersonDisplayNameWithContactTypesListForProject(projectProjectStatus.Project);
            ProjectTimelineSide            = ProjectTimelineSide.Right;

            EditButton   = ProjectTimeline.MakeProjectStatusEditLinkButton(projectProjectStatus, canEditProjectProjectStatus, canEditFinalStatusReport);
            DeleteButton = ProjectTimeline.MakeProjectStatusDeleteLinkButton(projectProjectStatus, canEditProjectProjectStatus, canEditFinalStatusReport);
            Color        = projectProjectStatus.ProjectStatus.ProjectStatusColor;
            ShowDetailsLinkHtmlString = ProjectTimeline.MakeProjectStatusDetailsLinkButton(projectProjectStatus);
            ProjectProjectStatus      = projectProjectStatus;
        }
Ejemplo n.º 3
0
 public ProjectTimelineProjectStatusChangeEvent(ProjectProjectStatus projectProjectStatus, bool canEditProjectProjectStatus, bool canEditFinalStatusReport)
 {
     Date        = projectProjectStatus.ProjectProjectStatusUpdateDate;
     DateDisplay = Date.ToString("MMM dd, yyyy");
     FiscalYear  = FirmaDateUtilities.CalculateFiscalYearForTenant(Date);
     Quarter     = (Quarter)FirmaDateUtilities.CalculateQuarterForTenant(Date);
     ProjectTimelineEventType       = ProjectTimelineEventType.ProjectStatusChange;
     TimelineEventTypeDisplayName   = projectProjectStatus.IsFinalStatusUpdate ? "Final Status Update" : "Status Updated";
     TimelineEventPersonDisplayName = projectProjectStatus.ProjectProjectStatusCreatePerson.GetPersonDisplayNameWithContactTypesListForProject(projectProjectStatus.Project);
     ProjectTimelineSide            = ProjectTimelineSide.Right;
     EditButton   = ProjectTimeline.MakeProjectStatusEditLinkButton(projectProjectStatus, canEditProjectProjectStatus, canEditFinalStatusReport);
     DeleteButton = ProjectTimeline.MakeProjectStatusDeleteLinkButton(projectProjectStatus, canEditProjectProjectStatus, canEditFinalStatusReport);
     Color        = projectProjectStatus.ProjectStatus.ProjectStatusColor;
     ShowDetailsLinkHtmlString = ProjectTimeline.MakeProjectStatusDetailsLinkButton(projectProjectStatus);
     ProjectProjectStatus      = projectProjectStatus;
     ActionItems = projectProjectStatus.ActionItems.ToList();
     AddActionItemLinkHtmlString = ModalDialogFormHelper.ModalDialogFormLink(string.Format("<span class='glyphicon glyphicon-plus' style='margin-right: 3px'></span>Add {0}", FieldDefinitionEnum.ActionItem.ToType().GetFieldDefinitionLabel()), SitkaRoute <ActionItemController> .BuildUrlFromExpression(c => c.NewForProjectStatus(projectProjectStatus.Project, projectProjectStatus)), string.Format("Add New {0}", FieldDefinitionEnum.ActionItem.ToType().GetFieldDefinitionLabel()), 700, "Add", "Cancel", new List <string> {
     }, null, null);
 }