Exemplo n.º 1
0
        public ResponseToWithdrawal WithdrawalToAccount(string account_name, string identifier, decimal balance, string pin)
        {
            RequestWithdrawal    z = new RequestWithdrawal(identifier, account_name, balance, pin);
            ResponseToWithdrawal q = ResponseToWithdrawal.WithdrawalResponse(z);

            return(q);
        }
Exemplo n.º 2
0
        public ResponseToWithdrawal ToWithdrawal(RequestWithdrawal requestWithdrawal)
        {
            ResponseToWithdrawal objToWithdrawal = new ResponseToWithdrawal();
            decimal withdraw_amount;
            string  identification, name, description;

            withdraw_amount = requestWithdrawal.Balance_To_Withdraw;
            identification  = requestWithdrawal.Identifier;
            name            = requestWithdrawal.Account_Name;
            description     = "";

            try
            {
                entities.bankWithdraw(withdraw_amount, identification, name, description);
                objToWithdrawal.Success = true;
                objToWithdrawal.Message = "Se ha retirado dinero con exito!";
            }
            catch
            {
                objToWithdrawal.Success = false;
                objToWithdrawal.Message = "Error, revise sus datos";
            }


            return(objToWithdrawal);
        }
Exemplo n.º 3
0
        public ResponseToWithdrawal Withdrawal(string account_name, string identifier, decimal balance, string pin)
        {
            RequestWithdrawal    withdrawal1 = new RequestWithdrawal(identifier, account_name, balance, pin);
            ResponseToWithdrawal withdrawal2 = ResponseToWithdrawal.WithdrawalResponse(withdrawal1);

            return(withdrawal2);
        }