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); }
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); }
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); }