private void DirectCalculateBalance(bool plus, int BaId, decimal inputVal)
        {
            var bankAcc = BankAccountHelper.GetById(BaId);

            if (plus)
            {
                bankAcc.Balance += inputVal;
            }
            else
            {
                bankAcc.Balance -= inputVal;
            }
        }
Exemple #2
0
 private void UpdateBalanceForBankAccs(List <int> baIds)
 {
     foreach (var p in baIds)
     {
         var bankAcc = BankAccountHelper.GetById(p);
         bankAcc.Balance = TransactionHelper.GetSumOfAllTransByBaId(p);
         DbContext.SaveChanges();
     }
 }