Пример #1
0
        public void Load(int transferID)
        {
            using (var ctx = new accountingEntities())
            {
                INTERNALTSFR= ctx.internalTransfers
                    .Where(x => x.ID == transferID)
                    .SingleOrDefault();

                if (INTERNALTSFR == null)
                    throw new Exception("no such a EXT Payment Exists");
            }
        }
Пример #2
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);

                INTERNALTSFR= new internalTransfer{ID = TRANSFER.ID};

                ctx.internalTransfers.AddObject(INTERNALTSFR);
                ctx.SaveChanges();

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