public override void RecreateExtendedProperties() { base.RecreateExtendedProperties(); ExtendedProperties.Add("GenderInt32", ((Int32)Gender).ToString()); ExtendedProperties.Add("EthnicityId", EthnicityId.ToString()); foreach (String currentKey in AgeCriteria.MapToExtendedProperties().Keys) { ExtendedProperties.Add(currentKey, AgeCriteria.MapToExtendedProperties()[currentKey]); } foreach (String currentKey in DateCriteria.MapToExtendedProperties().Keys) { ExtendedProperties.Add(currentKey, DateCriteria.MapToExtendedProperties()[currentKey]); } return; }
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, "GenderInt32", ((Int32)Gender).ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "Gender", Gender.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "UseAgeCriteria", UseAgeCriteria.ToString()); if (useAgeCriteria) { CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "AgeMinimum", AgeMinimum.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "AgeMaximum", AgeMaximum.ToString()); } if (ethnicityId != 0) { CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "EthnicityId", EthnicityId.ToString()); CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "Ethnicity", EthnicityName); } #endregion return(document); }