コード例 #1
0
 public CuentaController(
     ICuentaService cuentaService,
     IApiResponseMessage apiResponseMessage)
 {
     _cuentaService      = cuentaService;
     _apiResponseMessage = apiResponseMessage;
 }
コード例 #2
0
 public ConfPagoServicioEmpresaViewModel(IOperacionService operacionService, ICuentaService cuentaService, INavigationService navigationService, IEventAggregator eventAggregator, IUserDialogs userDialogs)
     : base(navigationService, userDialogs)
 {
     this.CuentaService    = cuentaService;
     this.OperacionService = operacionService;
     this.EventAggregator  = eventAggregator;
 }
        public HttpResponseMessage GetCuenta(HttpRequestMessage request, [FromBody] CuentaViewModel cuentaViewModel)
        {
            TransactionalInformation transaction;

            int cuentaID = cuentaViewModel.CuentaID;

            _cuentaService = new CuentaBusinessService();
            Cuenta cuenta = _cuentaService.GetCuentaByCuentaID(cuentaID, out transaction);

            if (transaction.ReturnStatus == false)
            {
                cuentaViewModel.ReturnStatus     = false;
                cuentaViewModel.ReturnMessage    = transaction.ReturnMessage;
                cuentaViewModel.ValidationErrors = transaction.ValidationErrors;

                var responseError = Request.CreateResponse <CuentaViewModel>(HttpStatusCode.BadRequest, cuentaViewModel);
                return(responseError);
            }

            cuentaViewModel.CuentaID   = cuenta.CuentaID;
            cuentaViewModel.Saldo      = cuenta.Saldo;
            cuentaViewModel.TipoCuenta = cuenta.TipoCuenta;
            cuentaViewModel.UsuarioID  = cuenta.UsuarioID;

            cuentaViewModel.ReturnStatus  = true;
            cuentaViewModel.ReturnMessage = transaction.ReturnMessage;

            var response = Request.CreateResponse <CuentaViewModel>(HttpStatusCode.OK, cuentaViewModel);

            return(response);
        }
コード例 #4
0
 public ConfDatosPagoViewModel(IOperacionService operacionService, ICuentaService cuentaService, ICatalogoService catalogoService, INavigationService navigationService, IPageDialogService dialogService, IEventAggregator eventAggregator)
     : base(navigationService, dialogService)
 {
     this.CatalogoService  = catalogoService;
     this.CuentaService    = cuentaService;
     this.EventAggregator  = eventAggregator;
     this.OperacionService = operacionService;
 }
        public HttpResponseMessage GetCuentas(HttpRequestMessage request, [FromBody] CuentaViewModel cuentaViewModel)
        {
            TransactionalInformation transaction;

            int currentPageNumber = cuentaViewModel.CurrentPageNumber;

            if (currentPageNumber == 0)
            {
                currentPageNumber = 1;
            }
            int pageSize = cuentaViewModel.PageSize;

            if (pageSize == 0)
            {
                pageSize = 1;
            }
            string sortExpression = cuentaViewModel.SortExpression;
            string sortDirection  = cuentaViewModel.SortDirection;

            _cuentaService = new CuentaBusinessService();

            List <Cuenta> cuentas = _cuentaService.GetCuentasByUsuario(1, currentPageNumber, pageSize, sortExpression, sortDirection, out transaction);

            if (transaction.ReturnStatus == false)
            {
                cuentaViewModel.ReturnStatus     = false;
                cuentaViewModel.ReturnMessage    = transaction.ReturnMessage;
                cuentaViewModel.ValidationErrors = transaction.ValidationErrors;

                var responseError = Request.CreateResponse <CuentaViewModel>(HttpStatusCode.BadRequest, cuentaViewModel);
                return(responseError);
            }

            cuentaViewModel.TotalPages    = transaction.TotalPages;
            cuentaViewModel.TotalRows     = transaction.TotalRows;
            cuentaViewModel.Cuentas       = cuentas;
            cuentaViewModel.ReturnStatus  = true;
            cuentaViewModel.ReturnMessage = transaction.ReturnMessage;

            var response = Request.CreateResponse <CuentaViewModel>(HttpStatusCode.OK, cuentaViewModel);

            return(response);
        }
コード例 #6
0
 public CuentaController(ICuentaService service, IMapper mapper)
 {
     _service     = service;
     this._mapper = mapper;
 }
コード例 #7
0
ファイル: CuentaController.cs プロジェクト: link2618/pruebaB
 public CuentaController(ICuentaService repository)
 {
     this._cuentaService = repository;
 }
コード例 #8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="cuentaSrv"></param>
 /// <param name="userSrv"></param>
 public CuentaController(ICuentaService cuentaSrv,
                         IUserServices userSrv)
 {
     _cuentaSrv = cuentaSrv;
 }
コード例 #9
0
 public CuentaController(ICuentaService cuentaService)
 {
     _cuentaService = cuentaService;
 }
コード例 #10
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="cuenta_service"></param>
 public CuentaController(ICuentaService cuenta_service)
 {
     this.cuenta_service = cuenta_service;
 }
コード例 #11
0
 public HomeController()
 {
     service = new CuentaService();
 }
コード例 #12
0
 public HomeController(ICuentaService service)
 {
     this.service = service;
 }