Esempio n. 1
0
        public void createTransfer()
        {
            Funds funds = new Funds();

            funds.SendAmount      = 10;
            funds.SendCurrency    = 810;
            funds.ReceiveAmount   = 20;
            funds.ReceiveCurrency = 840;
            funds.Rate            = 2;

            Models.Remittance _newRemittance = new Remittance();
            _newRemittance.c_status_id = 1;
            _newRemittance.Code        = "---";
            _newRemittance.Receiver_id = 1;
            _newRemittance.Sender_id   = 1;
            _newRemittance.lstFunds    = new LinkedList <Funds>();
            _newRemittance.lstFunds.AddFirst(funds);

            ResultRemittance resultOfCreateTransfer;

            if (_newRemittance == null)
            {
                resultOfCreateTransfer       = new ResultRemittance();
                resultOfCreateTransfer.code  = -1;
                resultOfCreateTransfer.error = "Нет параметров для создания";
                //return resultOfCreateTransfer;
            }

            ManagerTransfer transfer = new ManagerTransfer();

            resultOfCreateTransfer = transfer.createNewTransfer(_newRemittance);

            //return resultOfCreateTransfer;
        }
Esempio n. 2
0
        public Result ChangeState([FromBody] TransferModifyState _changeState)
        {
            ManagerTransfer transfer           = new ManagerTransfer();
            var             resultChangeStatus = transfer.remittanceChangeState(_changeState);

            return(resultChangeStatus);
        }
Esempio n. 3
0
        public void changeStatus()
        {
            TransferModifyState _changeState = new TransferModifyState();

            _changeState.Remittance_Id = Guid.Parse("DAB06712-C962-4D74-8516-9D910EBD7688");
            _changeState.c_status_id   = 2;

            ManagerTransfer transfer           = new ManagerTransfer();
            var             resultChangeStatus = transfer.remittanceChangeState(_changeState);
            //return resultChangeStatus;
        }
Esempio n. 4
0
        public ResultRemittance Create([FromBody] Remittance _newRemittance)
        {
            ResultRemittance resultOfCreateTransfer;

            if (_newRemittance == null)
            {
                resultOfCreateTransfer       = new ResultRemittance();
                resultOfCreateTransfer.code  = -1;
                resultOfCreateTransfer.error = "Нет параметров для создания";
                return(resultOfCreateTransfer);
            }

            ManagerTransfer transfer = new ManagerTransfer();

            resultOfCreateTransfer = transfer.createNewTransfer(_newRemittance);

            return(resultOfCreateTransfer);
        }