Example #1
0
 public ParametricoController(IClientesService clientesService, IFicherosService ficherosService,
                              IPedidosService pedidosService, IPagosService pagosService, IHaberesService haberesService)
 {
     _clientesService = clientesService;
     _ficherosService = ficherosService;
     _pedidosService  = pedidosService;
     _pagosService    = pagosService;
     _haberesService  = haberesService;
 }
 public ClientesController(IClientesService ClientesService)
 {
     _ClientesService = ClientesService;
 }
Example #3
0
 public ClientesController(IClientesService clientesService)
 {
     this.clientesService = clientesService;
 }
 public ClientesController(IClientesService clientesService)
 {
     _clientesService = clientesService;
 }
Example #5
0
 public ClientesController(IClientesService clientServ, ICuentasService accountServ)
 {
     clientesService = clientServ;
     cuentasService  = accountServ;
 }
Example #6
0
 public PedidosController(IPedidosService pedidosService, IArticulosService articulosService, IClientesService clientesService) // IoC en StartUp.cs
 {
     _pedidosService   = pedidosService;
     _articulosService = articulosService;
     _clientesService  = clientesService;
 }
        public ClientesModule(IClientesService clientesService) : base("/clientes")
        {
            Get("/", args => { return(clientesService.GetClientes()); });

            Get("/{id}", args =>
            {
                Cliente cliente = clientesService.GetCliente(args.id);
                if (cliente != null)
                {
                    return(cliente);
                }
                else
                {
                    return(new Response {
                        StatusCode = HttpStatusCode.NotFound
                    });
                }
            });

            Post("/", args =>
            {
                var cliente = this.Bind <Cliente>();
                if (cliente.Name == null || cliente.Surname == null || cliente.Address == null)
                {
                    return(new Response {
                        StatusCode = HttpStatusCode.Forbidden
                    });
                }
                else
                {
                    return(clientesService.CreateCliente(cliente));
                }
            });

            Put("/{id}", args =>
            {
                var cliente = this.Bind <Cliente>();
                cliente.Id  = args.id;
                if (cliente.Name == null || cliente.Surname == null || cliente.Address == null)
                {
                    return(new Response {
                        StatusCode = HttpStatusCode.Forbidden
                    });
                }
                else
                {
                    Cliente edited = clientesService.EditCliente(cliente);
                    if (edited == null)
                    {
                        return(new Response {
                            StatusCode = HttpStatusCode.NotFound
                        });
                    }
                    else
                    {
                        return(edited);
                    }
                }
            });

            Delete("/{id}", args =>
            {
                if (clientesService.DeleteCliente(args.id))
                {
                    return(204);
                }
                else
                {
                    return(new Response {
                        StatusCode = HttpStatusCode.NotFound
                    });
                }
            });
        }
 public ClientesAppService(IClientesService serviceBase) : base(serviceBase)
 {
     _serviceBase = serviceBase;
 }
 public ClientesApiController(
     ClientesService clientesService)
 {
     this.clientesService = clientesService;
 }
Example #10
0
 public ListagensPresenter(IListagensView listagensView)
 {
     _listagensView   = listagensView;
     _clientesService = new ClientesService();
 }
Example #11
0
 public ClientesAppService(IClientesService clientesService) : base(clientesService)
 {
     _clientesService = clientesService;
 }
 public ClientesAppService(IClientesService serviceBase, IMapper mapper)
 {
     _serviceBase = serviceBase;
     _mapper      = mapper;
 }
Example #13
0
 public CadastrosPresenter(ICadastrosView cadastroView)
 {
     _cadastroView    = cadastroView;
     _clientesService = new ClientesService();
 }
Example #14
0
 public ClientesController(IClientesService service)
 {
     this.service = service;
 }
 public ClienteController(ILogger <ClienteController> logger, IClientesService clientesService)
 {
     _logger          = logger;
     _clientesService = clientesService;
 }
 //**constructor para inyectar
 public ClientesController(IClientesService clientesOps)
 {
     this.clientesOps = clientesOps;
 }
Example #17
0
 public PlanosService(IPlanosRepository plano, IClientesService clientesService)
 {
     _plano           = plano;
     _clientesService = clientesService;
 }
Example #18
0
 public ClientesController(ClientesService clientesService, ProdutosService produtosService, IMapper mapper)
 {
     _clientesService = clientesService;
     _produtosService = produtosService;
     _mapper          = mapper;
 }
Example #19
0
 public ProdutosService(ClientesService service)
 {
     _clientesService = service;
 }
 public ClientesController(IClientesService clientesService)
 {
     _clientes = clientesService;
 }
Example #21
0
 public wishListController(IClientesService clienteService)
 {
     _clientesService = clienteService;
 }