예제 #1
0
 public int Update(TnfProperty tnfProperty)
 {
     return(Update(new object[]
     {
         tnfProperty.Oid,
         tnfProperty.PropertyObjectOid,
         tnfProperty.ValidFrom?.Date,
         tnfProperty.ValidTo?.Date,
         AttributeValuesToXmlString(tnfProperty.AttributeValues)
     }));
 }
예제 #2
0
 public void Add(TnfProperty tnfProperty)
 {
     Add(new object[]
     {
         tnfProperty.Oid,
         tnfProperty.PropertyObjectOid,
         tnfProperty.ValidFrom?.Date,
         tnfProperty.ValidTo?.Date,
         AttributeValuesToXmlString(tnfProperty.AttributeValues)
     });
 }
예제 #3
0
        private static TnfProperty ReadProperty(IDataRecord reader)
        {
            var tnfProperty = new TnfProperty();

            tnfProperty.Oid = reader["oid"].FromDbString();
            tnfProperty.PropertyObjectOid = reader["property_object_oid"].FromDbString();
            tnfProperty.ValidFrom         = reader["valid_from"].ToDateTime();
            tnfProperty.ValidTo           = reader["valid_to"].ToDateTime();
            string attributeValuesXml = reader["attribute_values"].ToString();

            tnfProperty.AttributeValues = Serializer.Deserialize(new XmlTextReader(new StringReader(attributeValuesXml))) as TnfAttributes;
            return(tnfProperty);
        }