Exemplo n.º 1
0
        public TIMS_ProjectInterfaceAgreementWorkflowViewModel(TIMS_ProjectInterfaceAgreementWorkflow m, bool convertSubs = false)
        {
            if (m != null)
            {
                this.ID                     = m.ID;
                this.WorkflowTypeID         = m.WorkflowTypeID;
                this.InterfaceAgreementID   = m.InterfaceAgreementID;
                this.DateInitiated          = m.DateInitiated;
                this.LeadStateID            = m.LeadStateID;
                this.InterfaceStateID       = m.InterfaceStateID;
                this.UserID                 = m.UserID;
                this.IsDraft                = m.IsDraft;
                this.DisciplineID           = m.DisciplineID;
                this.SystemID               = m.SystemID;
                this.AreaID                 = m.AreaID;
                this.ShortDescription       = m.ShortDescription;
                this.DetailedDescription    = m.DetailedDescription;
                this.TIMS_ProjectArea       = convertSubs ? new TIMS_ProjectAreaViewModel(m.TIMS_ProjectArea) : null;
                this.TIMS_ProjectAttachment = convertSubs && m.TIMS_ProjectAttachment != null?m.TIMS_ProjectAttachment.Select(x => new TIMS_ProjectAttachmentViewModel(x)).ToList() : null;

                this.TIMS_ProjectComment = convertSubs && m.TIMS_ProjectComment != null?m.TIMS_ProjectComment.Select(x => new TIMS_ProjectCommentViewModel(x)).ToList() : null;

                this.TIMS_ProjectDiscipline         = convertSubs ? new TIMS_ProjectDisciplineViewModel(m.TIMS_ProjectDiscipline) : null;
                this.TIMS_ProjectInterfaceAgreement = convertSubs ? new TIMS_ProjectInterfaceAgreementViewModel(m.TIMS_ProjectInterfaceAgreement) : null;
                this.TIMS_User         = convertSubs ? new TIMS_UserViewModel(m.TIMS_User) : null;
                this.TIMS_WorkflowType = convertSubs ? new TIMS_WorkflowTypeViewModel(m.TIMS_WorkflowType) : null;
            }
        }
Exemplo n.º 2
0
        public override BaseViewModel <TIMS_ProjectInterfaceAgreementWorkflow> FromModel <M>(M mo, bool convertSubs)
        {
            var m = mo as TIMS_ProjectInterfaceAgreementWorkflow;

            if (m != null)
            {
                this.ID                     = m.ID;
                this.WorkflowTypeID         = m.WorkflowTypeID;
                this.InterfaceAgreementID   = m.InterfaceAgreementID;
                this.DateInitiated          = m.DateInitiated;
                this.LeadStateID            = m.LeadStateID;
                this.InterfaceStateID       = m.InterfaceStateID;
                this.UserID                 = m.UserID;
                this.IsDraft                = m.IsDraft;
                this.DisciplineID           = m.DisciplineID;
                this.SystemID               = m.SystemID;
                this.AreaID                 = m.AreaID;
                this.ShortDescription       = m.ShortDescription;
                this.DetailedDescription    = m.DetailedDescription;
                this.TIMS_ProjectArea       = convertSubs ? new TIMS_ProjectAreaViewModel(m.TIMS_ProjectArea) : null;
                this.TIMS_ProjectAttachment = convertSubs && m.TIMS_ProjectAttachment != null?m.TIMS_ProjectAttachment.Select(x => new TIMS_ProjectAttachmentViewModel(x)).ToList() : null;

                this.TIMS_ProjectComment = convertSubs && m.TIMS_ProjectComment != null?m.TIMS_ProjectComment.Select(x => new TIMS_ProjectCommentViewModel(x)).ToList() : null;

                this.TIMS_ProjectDiscipline         = convertSubs ? new TIMS_ProjectDisciplineViewModel(m.TIMS_ProjectDiscipline) : null;
                this.TIMS_ProjectInterfaceAgreement = convertSubs ? new TIMS_ProjectInterfaceAgreementViewModel(m.TIMS_ProjectInterfaceAgreement) : null;
                this.TIMS_User         = convertSubs ? new TIMS_UserViewModel(m.TIMS_User) : null;
                this.TIMS_WorkflowType = convertSubs ? new TIMS_WorkflowTypeViewModel(m.TIMS_WorkflowType) : null;
            }

            return(this);
        }
Exemplo n.º 3
0
        public TIMS_ProjectInterfacePointWorkflowViewModel(TIMS_ProjectInterfacePointWorkflow m, bool convertSubs = false)
        {
            if (m != null)
            {
                this.ID                     = m.ID;
                this.WorkflowTypeID         = m.WorkflowTypeID;
                this.InterfacePointID       = m.InterfacePointID;
                this.DateInitiated          = m.DateInitiated;
                this.LeadStateID            = m.LeadStateID;
                this.InterfaceStateID       = m.InterfaceStateID;
                this.SupportStateID         = m.SupportStateID;
                this.ProjectAreaID          = m.ProjectAreaID;
                this.ProjectPhysicalAreaID  = m.ProjectPhysicalAreaID;
                this.PhaseID                = m.PhaseID;
                this.InterfaceTypeID        = m.InterfaceTypeID;
                this.UserID                 = m.UserID;
                this.IsDraft                = m.IsDraft;
                this.TIMS_Phase             = convertSubs ? new TIMS_PhaseViewModel(m.TIMS_Phase) : null;
                this.TIMS_ProjectArea       = convertSubs ? new TIMS_ProjectAreaViewModel(m.TIMS_ProjectArea) : null;
                this.TIMS_ProjectAttachment = convertSubs && m.TIMS_ProjectAttachment != null?m.TIMS_ProjectAttachment.Select(x => new TIMS_ProjectAttachmentViewModel(x)).ToList() : null;

                this.TIMS_ProjectComment = convertSubs && m.TIMS_ProjectComment != null?m.TIMS_ProjectComment.Select(x => new TIMS_ProjectCommentViewModel(x)).ToList() : null;

                this.TIMS_ProjectDisciplineInterfaceType  = convertSubs ? new TIMS_ProjectDisciplineInterfaceTypeViewModel(m.TIMS_ProjectDisciplineInterfaceType) : null;
                this.TIMS_ProjectInterfacePointFieldEntry = convertSubs && m.TIMS_ProjectInterfacePointFieldEntry != null?m.TIMS_ProjectInterfacePointFieldEntry.Select(x => new TIMS_ProjectInterfacePointFieldEntryViewModel(x)).ToList() : null;

                this.TIMS_ProjectPhysicalArea = convertSubs ? new TIMS_ProjectPhysicalAreaViewModel(m.TIMS_ProjectPhysicalArea) : null;
                this.TIMS_User           = convertSubs ? new TIMS_UserViewModel(m.TIMS_User) : null;
                this.TIMS_WorkflowState  = convertSubs ? new TIMS_WorkflowStateViewModel(m.TIMS_WorkflowState) : null;
                this.TIMS_WorkflowState1 = convertSubs ? new TIMS_WorkflowStateViewModel(m.TIMS_WorkflowState1) : null;
                this.TIMS_WorkflowState2 = convertSubs ? new TIMS_WorkflowStateViewModel(m.TIMS_WorkflowState2) : null;
                this.TIMS_WorkflowType   = convertSubs ? new TIMS_WorkflowTypeViewModel(m.TIMS_WorkflowType) : null;
            }
        }