protected void createNew(int payerEntityID, int payeeEntityID, decimal amount, int currencyID,int cardID,int extPaymentTypeID)
        {
            using (var ctx = new AccContexts())
            using (var ts=new TransactionScope())
            {
                base.createNew(payerEntityID, payeeEntityID, amount, currencyID, (int)enums.paymentType.External);

                var _extPayment = new AccountingLib.Models.externalPayment()
                {
                    paymentID=base.paymentID,
                    extPaymentTypeID = extPaymentTypeID,
                    cardID=cardID
                };
                ctx.externalPayment.AddObject(_extPayment);
                ctx.SaveChanges();

                this.loadByPaymentID((int)_extPayment.paymentID);

                ts.Complete();
            }
        }
Example #2
0
        protected void createNew(int payerEntityID, int payeeEntityID, decimal amount, int currencyID, int cardID, int extPaymentTypeID)
        {
            using (var ctx = new AccContexts())
                using (var ts = new TransactionScope())
                {
                    base.createNew(payerEntityID, payeeEntityID, amount, currencyID, (int)enums.paymentType.External);

                    var _extPayment = new AccountingLib.Models.externalPayment()
                    {
                        paymentID        = base.paymentID,
                        extPaymentTypeID = extPaymentTypeID,
                        cardID           = cardID
                    };
                    ctx.externalPayment.AddObject(_extPayment);
                    ctx.SaveChanges();

                    this.loadByPaymentID((int)_extPayment.paymentID);

                    ts.Complete();
                }
        }
 /// <summary>
 /// Create a new externalPayment object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 public static externalPayment CreateexternalPayment(global::System.Int32 id)
 {
     externalPayment externalPayment = new externalPayment();
     externalPayment.ID = id;
     return externalPayment;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the externalPayment EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToexternalPayment(externalPayment externalPayment)
 {
     base.AddObject("externalPayment", externalPayment);
 }