Ejemplo n.º 1
0
        public int SaveTransactionSeq(ITransactionSeqDb transactionSeqDb, int? transactionNumber = null)
        {
            TransactionSeq record;
            var recordOld = new TransactionSeq();
            if (transactionSeqDb.TransactionSeqId == 0)
            {
                record = new TransactionSeq();
                Context.AddToTransactionSeqs(record);
            }
            else
            {
                record = Context.TransactionSeqs.Where(r => r.TransactionSeqId == transactionSeqDb.TransactionSeqId).First();
                ReflectionHelper.CopyAllProperties(record, recordOld);
            }

            Context.SaveChanges();
            if (transactionSeqDb.TransactionSeqId == 0)
            {
                transactionSeqDb.TransactionSeqId = record.TransactionSeqId;
                LogUnlinkedToDb(UserId, "TransactionSeqs", record.TransactionSeqId, "I", XmlHelper.GetObjectXml(record), transactionNumber);
            }
            else
            {
                LogUnlinkedToDb(UserId, "TransactionSeqs", record.TransactionSeqId, "U", XmlHelper.GetDifferenceXml(recordOld, record), transactionNumber);
            }

            return transactionSeqDb.TransactionSeqId;
        }
 public void AddToTransactionSeqs(TransactionSeq record)
 {
     _context.AddToTransactionSeqs(record);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the TransactionSeqs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTransactionSeqs(TransactionSeq transactionSeq)
 {
     base.AddObject("TransactionSeqs", transactionSeq);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Create a new TransactionSeq object.
 /// </summary>
 /// <param name="transactionSeqId">Initial value of the TransactionSeqId property.</param>
 public static TransactionSeq CreateTransactionSeq(global::System.Int32 transactionSeqId)
 {
     TransactionSeq transactionSeq = new TransactionSeq();
     transactionSeq.TransactionSeqId = transactionSeqId;
     return transactionSeq;
 }