public void Updatetransaction(Transaction transaction) { using (TransactionAccessClient _tran = new TransactionAccessClient(EndpointName.TransactionAccess)) { _tran.Update(transaction); } }
public void InsertTransaction(Transaction _transaction) { using (TransactionAccessClient _tran = new TransactionAccessClient(EndpointName.TransactionAccess)) { _tran.InsertTransaction(_transaction); } }
public void SetNotices(int _id, int _userid) { using (TransactionAccessClient _tran = new TransactionAccessClient(EndpointName.TransactionAccess)) { _tran.SetNotices(_id, _userid); } }
public void SetConfirm(Transaction transaction) { using (TransactionAccessClient _tran = new TransactionAccessClient(EndpointName.TransactionAccess)) { SettleService _settle = new SettleService(); WeeklySummaryCollection _weekco = new WeeklySummaryCollection(); //From Entity WeeklySummary _weekFrom = new WeeklySummary(); _weekFrom.ExchangeRate = transaction.ExchangeRate; _weekFrom.Period = transaction.Period; _weekFrom.Entity = transaction.FromEntity; _weekFrom.BaseTransaction = -(transaction.Amount); _weekFrom.BaseCurrency = transaction.FromCurrency; //To Entity WeeklySummary _weekTo = new WeeklySummary(); _weekTo.ExchangeRate = transaction.ExchangeRate; _weekTo.Period = transaction.Period; _weekTo.Entity = transaction.ToEntity; _weekTo.BaseTransaction = transaction.To_Amount; _weekTo.BaseCurrency = transaction.ToCurrency; _weekco.Add(_weekFrom); _weekco.Add(_weekTo); _settle.TransactionConfirm(_weekco); _tran.SetConfirm(transaction.ID, transaction.Updater.UserID, transaction.Period.ID); } }
public TransactionCollection LoadTransactionByPeriodID(int _periodid) { using (TransactionAccessClient _tran = new TransactionAccessClient(EndpointName.TransactionAccess)) { return new TransactionCollection(_tran.QueryByPeriodid(_periodid)); } }
public TransactionCollection LoadTransaction() { using (TransactionAccessClient _tran = new TransactionAccessClient(EndpointName.TransactionAccess)) { return new TransactionCollection(_tran.QueryAll()); } }
public void InsertTransactionCollection(TransactionCollection _collection) { using (TransactionAccessClient _tran = new TransactionAccessClient(EndpointName.TransactionAccess)) { _tran.InsertTransactionCollection(_collection.ToArray()); } }