public AcoountServiceResponse Deposit(AccountDepositOrWithdraw objAccountDepositOrWithdraw) { AcoountServiceResponse objAcoountServiceResponse = null; DLAccount objDLAccount = null; if (objAccountDepositOrWithdraw != null && ValidateAccountDepositOrWithdraw(objAccountDepositOrWithdraw, out strMessage)) { try { objAcoountServiceResponse = new AcoountServiceResponse(); objDLAccount = new DLAccount(); objAcoountServiceResponse = objDLAccount.Deposit(objAccountDepositOrWithdraw.AccountNumber, objAccountDepositOrWithdraw.Amount, objAccountDepositOrWithdraw.Currency); } finally { objDLAccount = null; } } else { throw new Exception(strMessage); } return(objAcoountServiceResponse); }
public AcoountServiceResponse Balance(long AccountNumber) { AcoountServiceResponse objAcoountServiceResponse = null; DLAccount objDLAccount = null; if (AccountNumber > 0) { try { objAcoountServiceResponse = new AcoountServiceResponse(); objDLAccount = new DLAccount(); objAcoountServiceResponse = objDLAccount.Balance(AccountNumber); } finally { objDLAccount = null; } } else { throw new Exception(strMessage); } return(objAcoountServiceResponse); }