Beispiel #1
0
        public void New(int issuerEntityID, int receiverEntityID, decimal amount, int currencyID)
        {
            using (var ctx = new accountingEntities())
            using (var ts = new TransactionScope())
            {
                base.TRANSFER = new transfer()
                {
                    issuerEntityID = issuerEntityID,
                    receiverEntityID = receiverEntityID,
                    amount = amount,
                    currencyID = currencyID,
                    transferTypeID = (int)TRANSFERTYPE
                };
                ctx.transfers.AddObject(TRANSFER);

                EXTERNALTSFR = new externalTransfer { ID = TRANSFER.ID };
                ctx.externalTransfers.AddObject(EXTERNALTSFR);

                CCTSFR = new creditTransfer { ID = EXTERNALTSFR.ID };
                ctx.creditTransfers.AddObject(CCTSFR);

                ctx.SaveChanges();
                ts.Complete();
            }
        }
Beispiel #2
0
        public void Load(int ccTransferID)
        {
            using (var ctx = new accountingEntities())
            {
                var all = ctx.creditTransfers
                    .Where(x => x.ID == ccTransferID)
                    .SingleOrDefault();

                CCTSFR = all;
                base.EXTERNALTSFR = all.externalTransfer;
                base.TRANSFER = all.externalTransfer.transfer;
            }
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the creditTransfers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTocreditTransfers(creditTransfer creditTransfer)
 {
     base.AddObject("creditTransfers", creditTransfer);
 }
 /// <summary>
 /// Create a new creditTransfer object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 public static creditTransfer CreatecreditTransfer(global::System.Int32 id)
 {
     creditTransfer creditTransfer = new creditTransfer();
     creditTransfer.ID = id;
     return creditTransfer;
 }