Esempio n. 1
0
 private bool InsufficientFunds(double Amount)
 {
     if (Amount > Balance)
     {
         var msg = $"Balance is {Balance}; Withdraw amount is {Amount}";
         var ex  = new Exceptions.InsufficientFundsException(msg);
         ex.AccountNumber      = AccountNumber;
         ex.AccountDescription = Description;
         ex.AccountBalance     = Balance;
         ex.WithdrawAmount     = Amount;
         throw ex;
     }
     return(false);
 }
Esempio n. 2
0
 private bool InsufficientFunds(double Amount)
 {
     if (Amount > Balance)
     {
         //Console.WriteLine($"{Amount} - Insufficient Funds, cannot complete withdrawl.");
         var msg = $"Balance is {Balance}; Withdrawal amount is {Amount}.";
         var ex  = new Exceptions.InsufficientFundsException(msg);
         ex.AccountNumber      = AccountNumber;
         ex.AccountDescription = Description;
         ex.Balance            = Balance;
         ex.Amount             = Amount;
         throw ex;
     }
     return(false);
 }