Ejemplo n.º 1
0
        public ResponseToTransfer ToTransfer(RequestTransfer requestTransfer)
        {
            ResponseToTransfer objToTransfer = new ResponseToTransfer();
            decimal            transfer_amount;
            //1: ORIGEN (AL QUE SE LE RESTA) 2: DESTINO(EL QUE RECIBE)
            string identification1, name1, identification2, name2, description;

            identification1 = requestTransfer.Identifier_Root;
            identification2 = requestTransfer.Identifier_To_Affect;
            name1           = requestTransfer.Account_Root;
            name2           = requestTransfer.Account_To_Affect;
            description     = "";
            transfer_amount = requestTransfer.Balance_To_Transfer;
            try
            {
                entities.bankTransfer(transfer_amount, identification1, name1, identification2, name2, description);
                objToTransfer.Success = true;
                objToTransfer.Message = "La transferencia se hizo con exito!";
            }
            catch
            {
                objToTransfer.Success = false;
                objToTransfer.Message = "La transferencia no se hizo con exito, intentelo mas tarde";
            }

            return(objToTransfer);
        }
Ejemplo n.º 2
0
        public ResponseToTransfer TransferToProperBankAccount(string identifier1, string identifier2, string account1, string account2, decimal balance, string pin)
        {
            RequestTransfer    v = new RequestTransfer(identifier1, identifier2, account1, account2, balance, pin);
            ResponseToTransfer y = ResponseToTransfer.ResponseToATransfer(v);

            return(y);
        }
Ejemplo n.º 3
0
        public ResponseToTransfer Transfer(string identifier1, string identifier2, string account1, string account2, decimal balance, string pin)
        {
            RequestTransfer    transfer1 = new RequestTransfer(identifier1, identifier2, account1, account2, balance, pin);
            ResponseToTransfer transfer2 = ResponseToTransfer.ResponseToATransfer(transfer1);

            return(transfer2);
        }
Ejemplo n.º 4
0
        public ResponseToTransfer TransferenciaCuentaPropia(string identifier_Root, string identifier_To_Affect, string account_Root, string account_To_Affect,
                                                            decimal balance, string pin)
        {
            RequestTransfer request = new RequestTransfer(identifier_Root, identifier_To_Affect, account_Root, account_To_Affect,
                                                          balance, pin);
            ResponseToTransfer response = ResponseToTransfer.ResponseToATransfer(request);

            return(response);
        }