public QualityStatementModel(QualityStatement qualityStatement) { this.QualityStatement = qualityStatement; // Create a hierarchy of QualityStatement items, mirroring the // corresponding Concept hierarchy. var rootItems = QualityStatementNode.GetHierarchy(QualityStatement); foreach (var item in rootItems) { this.RootNodes.Add(item); } }
/// <summary> /// Gathers information and applies it to the given quality statement /// item. /// </summary> /// <param name="node">A node with information about the quality /// statement item. Child nodes can also be retrieved from this.</param> /// <param name="contextNode"></param> /// <param name="qualityStatement"></param> public override void GatherInformationForItem( QualityStatementNode node, Node contextNode, QualityStatement qualityStatement) { string infoFromMyDataSource = "Sample Information"; node.Item.ComplianceDescription.Current = infoFromMyDataSource; // If your users should not edit the collected information, you can // indicate that information for this item has been gathered. // In this case, the item will be displayed as read-only in // Designer. qualityStatement.GatheredQualityConceptIds.Add( node.Item.ComplianceConcept.CompositeId); }
/// <summary> /// Returns a value indicating whether this information gatherer can /// collect information for the given item. /// </summary> /// <param name="node">A node with information about the quality /// statement item</param> /// <returns></returns> public override bool CanGatherInformationForItem( QualityStatementNode node) { // You can use a UserID, the Label, or any other piece of // information to determien whether you want to collect // information for this item. // In this case, we are collecting for the Statistical Population // item from the ESMS standard. if (node.Item.ComplianceConcept.GetUserIdValue("ESMS-NAME") == "STAT_POP") { return(true); } return(false); }
/// <summary> /// Gathers information and applies it to the given quality statement /// item. /// </summary> /// <param name="node">A node with information about the quality /// statement item. Child nodes can also be retrieved from this.</param> /// <param name="contextNode"></param> /// <param name="qualityStatement"></param> public override void GatherInformationForItem( QualityStatementNode node, Node contextNode, QualityStatement qualityStatement) { string infoFromMyDataSource = "Sample Information"; node.Item.ComplianceDescription.Current = infoFromMyDataSource; // If your users should not edit the collected information, you can // indicate that information for this item has been gathered. // In this case, the item will be displayed as read-only in // Designer. qualityStatement.GatheredQualityConceptIds.Add( node.Item.ComplianceConcept.CompositeId); }
/// <summary> /// Returns a value indicating whether this information gatherer can /// collect information for the given item. /// </summary> /// <param name="node">A node with information about the quality /// statement item</param> /// <returns></returns> public override bool CanGatherInformationForItem( QualityStatementNode node) { // You can use a UserID, the Label, or any other piece of // information to determien whether you want to collect // information for this item. // In this case, we are collecting for the Statistical Population // item from the ESMS standard. if (node.Item.ComplianceConcept.GetUserIdValue("ESMS-NAME") == "STAT_POP") { return true; } return false; }