/// <summary>
 /// Deprecated Method for adding a new object to the paymentActionTransaction EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTopaymentActionTransaction(paymentActionTransaction paymentActionTransaction)
 {
     base.AddObject("paymentActionTransaction", paymentActionTransaction);
 }
Beispiel #2
0
        private void RecordInvoicePaymentTransactions(List<int> txns, int paymentID , enums.paymentStat payStat)
        {
            using (var ctx = new AccountingLib.Models.AccContexts())
            {
                //Create Payment Action
                var payAction = new AccountingLib.Models.paymentAction()
                {
                    paymentID = paymentID,
                    paymentStatID = (int)payStat
                };
                ctx.paymentAction.AddObject(payAction);
                ctx.SaveChanges();

                //Record Pyament Action TXNS
                foreach (var txn in txns)
                {
                    var newPayActionTxn = new paymentActionTransaction()
                    {
                        paymentActionID = payAction.ID,
                        transactionID = txn
                    };
                    ctx.paymentActionTransaction.AddObject(newPayActionTxn);
                    ctx.SaveChanges();
                }
            }
        }
 /// <summary>
 /// Create a new paymentActionTransaction object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 public static paymentActionTransaction CreatepaymentActionTransaction(global::System.Int32 id)
 {
     paymentActionTransaction paymentActionTransaction = new paymentActionTransaction();
     paymentActionTransaction.ID = id;
     return paymentActionTransaction;
 }