Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }