public OutAccount TransferFund(int accountId, string operation, double amount) { OutAccount outAcc = null; Transaction ts = null; AccountBalanceBLL abBll = new AccountBalanceBLL(_unit); TransactionBLL tBLL = new TransactionBLL(_unit); Account acc = GetByID(accountId); AccountBalance existAB = abBll.TransferFund(accountId, operation, amount); outAcc = GetOutAccountFromObjs(acc, existAB); return(outAcc); }
public OutAccount Create(OutAccount outAccount) { AccountBalanceBLL abb = new AccountBalanceBLL(_unit); Account acc = this.GetAccountFromOut(outAccount); base.Create(acc); var balance = abb.InitCreate(acc.Id); if (outAccount.AvailableFund > 0) { balance = abb.TransferFund(acc.Id, "Deposit", outAccount.AvailableFund); } outAccount = GetOutAccountFromObjs(acc, balance); return(outAccount); }