/// <summary> /// Convert an XMLNameValueCollection into a sql object /// </summary> /* * public static object ToSql(ArrayList input) * { * return ToSql(input, true); * } * * public static object ToSql(ArrayList input, bool blnStrongDataType) * { * if (input == null) * return DBNull.Value; * else * { * string strData = General.Utilities.Serialization.ArrayList.SerializeArrayList(input, ",",blnStrongDataType); * if (!StringFunctions.IsNullOrWhiteSpace(strData)) * return strData; * else * return DBNull.Value; * } * } */ /// <summary> /// Convert an XMLNameValueCollection into a sql object /// </summary> public static object ToSql(PostalAddress input) { if (input == null) { return(DBNull.Value); } else { return(PostalAddress.Serialize(input)); } }
public XElement Serialize(string name = null) { return(new XElement(UblNames.Cac + (name ?? nameof(Party)), WebsiteURI?.Serialize(nameof(WebsiteURI)), EndpointID?.Serialize(nameof(EndpointID)), IndustryClassificationCode.Serialize(nameof(IndustryClassificationCode)), PartyIdentification?.Serialize(), PartyName?.Serialize(), PostalAddress?.Serialize(nameof(PostalAddress)), Contact?.Serialize(), Person?.Serialize(), AgentParty?.Serialize(nameof(AgentParty)), ServiceProviderParty?.Serialize(), PowerOfAttorneys?.Select(poa => poa?.Serialize()) )); }