Beispiel #1
0
 /// <summary>
 /// Delete:s a tnfChange
 /// </summary>
 /// <param name="tnfChange"></param>
 /// <returns></returns>
 public int Delete(TnfChange tnfChange)
 {
     if (m_primaryKey[0] != "change_transaction_oid" || m_primaryKey[1] != "order_number")
     {
         throw new ApplicationException("Delete method expects primary key to be change_transaction_oid,order_number");
     }
     return(Delete(new object[]
     {
         tnfChange.ChangeTransactionOid,
         tnfChange.OrderNumber,
     }));
 }
Beispiel #2
0
 public int Update(TnfChange tnfChange)
 {
     return(Update(new object[]
     {
         tnfChange.Oid,
         tnfChange.ClassId,
         tnfChange.ChangeTransactionOid,
         tnfChange.OrderNumber,
         tnfChange.ChangeType,
         tnfChange.ChangeReason,
         tnfChange.Timestamp.ToUniversalTime(),
         tnfChange.OldVid,
         tnfChange.NewVid,
         tnfChange.CreatorId,
         tnfChange.Remark
     }));
 }
Beispiel #3
0
 public void Add(TnfChange tnfChange)
 {
     Add(new object[]
     {
         tnfChange.Oid,
         tnfChange.ClassId,
         tnfChange.ChangeTransactionOid,
         tnfChange.OrderNumber,
         tnfChange.ChangeType,
         tnfChange.ChangeReason,
         tnfChange.Timestamp.ToUniversalTime(),
         tnfChange.OldVid,
         tnfChange.NewVid,
         tnfChange.CreatorId,
         tnfChange.Remark
     });
 }
Beispiel #4
0
        private static TnfChange ReadObject(IDataRecord reader)
        {
            var tnfChange = new TnfChange();

            tnfChange.Oid     = reader["oid"].FromDbString();
            tnfChange.ClassId = reader["class_id"].FromDbString();
            tnfChange.ChangeTransactionOid = reader["change_transaction_oid"].FromDbString();
            tnfChange.OrderNumber          = (Int32)reader["order_number"].ToInt32();
            tnfChange.ChangeType           = (Int32)reader["change_type"].ToInt32();
            tnfChange.ChangeReason         = reader["change_reason"].FromDbString();
            tnfChange.Timestamp            = (DateTime)reader["timestamp"].ToDateTime();
            tnfChange.OldVid    = reader["old_vid"].FromDbString();
            tnfChange.NewVid    = reader["new_vid"].FromDbString();
            tnfChange.CreatorId = reader["creator_id"].FromDbString();
            tnfChange.Remark    = reader["remark"].FromDbString();

            return(tnfChange);
        }