public override System.Xml.XmlDocument XmlSerialize() { System.Xml.XmlDocument document = base.XmlSerialize(); System.Xml.XmlNode propertiesNode = document.ChildNodes[1].ChildNodes[0]; #region Properties CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "WorkflowId", workflowId.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "WorkflowName", application.CoreObjectGetNameById("Workflow", workflowId)); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "ScheduleValue", scheduleValue.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "ScheduleQualifier", ((Int32)scheduleQualifier).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "ScheduleQualifierName", scheduleQualifier.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "ThresholdValue", thresholdValue.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "ThresholdQualifier", ((Int32)thresholdQualifier).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "ThresholdQualifierName", thresholdQualifier.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "InitialConstraintValue", initialConstraintValue.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "InitialConstraintQualifier", ((Int32)initialConstraintQualifier).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "InitialConstraintQualifierName", initialConstraintQualifier.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "InitialMilestoneValue", initialMilestoneValue.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "InitialMilestoneQualifier", ((Int32)initialMilestoneQualifier).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "InitialMilestoneQualifierName", initialMilestoneQualifier.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "GetWorkViewId", getWorkViewId.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "GetWorkViewName", application.CoreObjectGetNameById("WorkQueueView", getWorkViewId)); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "GetWorkUseGrouping", getWorkUseGrouping.ToString()); #endregion #region Work Queue Teams System.Xml.XmlElement workQueueTeamsNode = CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "WorkQueueTeams", String.Empty); foreach (WorkQueueTeam currentWorkQueueTeam in workTeams) { System.Xml.XmlElement workQueueTeamNode; workQueueTeamNode = document.CreateElement("WorkQueueTeam"); workQueueTeamNode.SetAttribute("WorkTeamId", currentWorkQueueTeam.WorkTeamId.ToString()); workQueueTeamNode.SetAttribute("WorkTeamName", application.CoreObjectGetNameById("WorkTeam", currentWorkQueueTeam.WorkTeamId)); workQueueTeamNode.SetAttribute("Permission", ((Int32)currentWorkQueueTeam.Permission).ToString()); workQueueTeamNode.SetAttribute("PermissionName", currentWorkQueueTeam.Permission.ToString()); workQueueTeamsNode.AppendChild(workQueueTeamNode); } #endregion return(document); }
public override System.Xml.XmlDocument XmlSerialize() { System.Xml.XmlDocument document = base.XmlSerialize(); System.Xml.XmlNode propertiesNode = document.ChildNodes[1].ChildNodes[0]; #region Properties CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "MetricType", ((Int32)metricType).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "MetricTypeName", metricType.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "DataType", ((Int32)dataType).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "DataTypeName", dataType.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "MinimumValue", minimumValue.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "MaximumValue", maximumValue.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostDataSource", ((Int32)costDataSource).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostClaimDateType", ((Int32)costClaimDateType).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostDataSourceName", costDataSource.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostReportingPeriod", ((Int32)costReportingPeriod).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostReportingPeriodName", costReportingPeriod.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostReportingPeriodValue", costReportingPeriodValue.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostReportingPeriodQualifier", ((Int32)costReportingPeriodQualifier).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostReportingPeriodQualifierName", costReportingPeriodQualifier.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostWatermarkPeriod", ((Int32)costWatermarkPeriod).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostWatermarkPeriodName", costWatermarkPeriod.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostWatermarkPeriodValue", costWatermarkPeriodValue.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostWatermarkPeriodQualifier", ((Int32)costWatermarkPeriodQualifier).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "CostWatermarkPeriodQualifierName", costWatermarkPeriodQualifier.ToString()); #endregion // TODO: COST SERVICES EXPORT #region Cost Services //System.Xml.XmlElement CostServicesNode = CommonFunctions.XmlDocumentAppendPropertyNode (document, propertiesNode, "CostServices", String.Empty); //foreach (WorkQueueTeam currentWorkQueueTeam in workTeams) { // System.Xml.XmlElement workQueueTeamNode; // workQueueTeamNode = document.CreateElement ("WorkQueueTeam"); // workQueueTeamNode.SetAttribute ("WorkTeamId", currentWorkQueueTeam.WorkTeamId.ToString ()); // workQueueTeamNode.SetAttribute ("WorkTeamName", application.CoreObjectGetNameById ("WorkTeam", currentWorkQueueTeam.WorkTeamId)); // workQueueTeamNode.SetAttribute ("Permission", ((Int32)currentWorkQueueTeam.Permission).ToString ()); // workQueueTeamNode.SetAttribute ("PermissionName", currentWorkQueueTeam.Permission.ToString ()); // workQueueTeamsNode.AppendChild (workQueueTeamNode); //} #endregion return(document); }