示例#1
0
 public HomeController(IEnderecoEntregaRepository repositoryEnderecoEntrega, IClienteRepository repositoryCliente, LoginCliente loginCliente, GerenciarEmail gerenciarEmail)
 {
     _repositoryEnderecoEntrega = repositoryEnderecoEntrega;
     _repositoryCliente         = repositoryCliente;
     _loginCliente   = loginCliente;
     _gerenciarEmail = gerenciarEmail;
 }
 public PagamentoController(
     ILogger <PagamentoController> logger,
     GerenciarEmail gerenciarEmail,
     GerenciarPagarMe gerenciarPagarMe,
     LoginCliente loginCliente,
     Cookie cookie,
     CookieCarrinhoCompra carrinhoCompra,
     IPedidoRepository pedidoRepository,
     IPedidoSituacaoRepository pedidoSituacaoRepository,
     IEnderecoEntregaRepository enderecoEntregaRepository,
     IProdutoRepository produtoRepository,
     IMapper mapper,
     WSCorreiosCalcularFrete wscorreios,
     CalcularPacote calcularPacote,
     CookieFrete cookieValorPrazoFrete
     )
     : base(
         loginCliente,
         enderecoEntregaRepository,
         carrinhoCompra,
         produtoRepository,
         mapper,
         wscorreios,
         calcularPacote,
         cookieValorPrazoFrete)
 {
     _gerenciarEmail           = gerenciarEmail;
     _pedidoRepository         = pedidoRepository;
     _pedidoSituacaoRepository = pedidoSituacaoRepository;
     _cookie           = cookie;
     _gerenciarPagarMe = gerenciarPagarMe;
     _logger           = logger;
 }
示例#3
0
 public CarrinhoCompraController(LoginCliente loginCliente, IEnderecoEntregaRepository enderecoEntregaRepository, CarrinhoCompra carrinhoCompra, IProdutoRepository produtoRepository, IMapper mapper)
     : base(carrinhoCompra,
            produtoRepository,
            mapper)
 {
     _loginCliente = loginCliente;
     _enderecoEntregaRepository = enderecoEntregaRepository;
 }
示例#4
0
 public PagamentoController(IPedidoSituacaoRepository pedidoSituacaoRepository, IPedidoRepository pedidoRepository, GerenciarPagarMe gerenciarPagarMe, LoginCliente loginCliente, IEnderecoEntregaRepository enderecoEntrega, GerenciadorCookie cookie, CarrinhoCompra carrinhoCompra, IProdutoRepository produtoRepository, IMapper mapper, WSCalcularFrete frete, WSCalcularPacote pacote, CookieValorPrazoFrete cookieValorPrazoFrete) : base(carrinhoCompra, produtoRepository, mapper, frete, pacote, cookieValorPrazoFrete, cookie)
 {
     _pedidoSituacaoRepository = pedidoSituacaoRepository;
     _pedidoRepository         = pedidoRepository;
     _enderecoEntrega          = enderecoEntrega;
     _loginCliente             = loginCliente;
     _gerenciarPagarMe         = gerenciarPagarMe;
 }
 public PagamentoController(CookieCarrinhoCompra carrinhoCompra,
                            IProdutoRepository produtoRepository, IMapper mapper,
                            WSCorreiosCalcularFrete wSCorreios, CalcularPacote calcular,
                            CookieFrete cookieValorPrazoFrete, Cookie cookie, IEnderecoEntregaRepository enderecoEntrega,
                            LoginCliente loginCliente, GerenciarPagarMe gerenciarPagarMe)
     : base(carrinhoCompra, produtoRepository, mapper, wSCorreios, calcular, cookieValorPrazoFrete, enderecoEntrega, loginCliente)
 {
     this._cookie           = cookie;
     this._gerenciarPagarMe = gerenciarPagarMe;
 }
示例#6
0
 public BaseController(LoginCliente loginCliente, IEnderecoEntregaRepository enderecoEntregaRepository, CookieCarrinhoCompra cookieCarrinhoCompra, IProdutoRepository produtoRepository, IMapper mapper, WSCorreiosCalcularFrete wscorreios, CalcularPacote calcularPacote, CookieFrete cookieFrete)
 {
     _loginCliente = loginCliente;
     _enderecoEntregaRepository = enderecoEntregaRepository;
     _cookieCarrinhoCompra      = cookieCarrinhoCompra;
     _produtoRepository         = produtoRepository;
     _mapper         = mapper;
     _wscorreios     = wscorreios;
     _calcularPacote = calcularPacote;
     _cookieFrete    = cookieFrete;
 }
示例#7
0
 public UsuarioController(IUsuarioRepository usuarioRepository,
                          ITokenService tokenService,
                          IStringLocalizer <resources> localizer,
                          UserManager <User> userManager,
                          IEnderecoEntregaRepository entregaRepository)
 {
     _usuarioRepository = usuarioRepository;
     _tokenService      = tokenService;
     _localizer         = localizer;
     _userManager       = userManager;
     _entregaRepository = entregaRepository;
 }
        protected override ValidationResult IsValid(object value, ValidationContext validationContext)
        {
            LoginCliente _loginCliente = (LoginCliente)validationContext.GetService(typeof(LoginCliente));
            IEnderecoEntregaRepository _enderecoEntregaRepository = (IEnderecoEntregaRepository)validationContext.GetService(typeof(IEnderecoEntregaRepository));

            string CEP = value.ToString();

            Cliente         cliente  = _loginCliente.BuscaClienteSessao();
            EnderecoEntrega endereco = _enderecoEntregaRepository.ObterEndereco(a => a.CEP == CEP && a.ClienteId == cliente.Id);

            if (CEP == cliente.CEP || endereco != null)
            {
                return(new ValidationResult("O CEP já está cadastrado"));
            }
            return(ValidationResult.Success);
        }
示例#9
0
 public CarrinhoCompraController(
     ILogger <CarrinhoCompraController> logger,
     LoginCliente loginCliente,
     CookieCarrinhoCompra carrinhoCompra,
     IEnderecoEntregaRepository enderecoEntregaRepository,
     IProdutoRepository produtoRepository,
     IMapper mapper,
     WSCorreiosCalcularFrete wscorreios,
     CalcularPacote calcularPacote,
     CookieFrete cookieValorPrazoFrete)
     : base(
         loginCliente,
         carrinhoCompra,
         enderecoEntregaRepository,
         produtoRepository,
         mapper,
         wscorreios,
         calcularPacote,
         cookieValorPrazoFrete)
 {
     _logger = logger;
 }
 public VendaController(IVendaRepository vendaRepository, CarrinhoCompras carrinhoCompras,
                        GerenciarPagarMe pagarMe,
                        PagamentoServico servico, IUsuarioRepository usuarioRepository,
                        IMarcaCartaoCreditoRepository cartaoCreditoRepository,
                        IMovimentacaoRepository movimentacaoRepository,
                        CookieFrete cookieFrete,
                        IEnderecoEntregaRepository entregaRepository,
                        ITokenService tokenService,
                        IPedidoRepository pedidoRepository)
 {
     _tokenService            = tokenService;
     _vendaRepository         = vendaRepository;
     _carrinhoCompras         = carrinhoCompras;
     _pagarMe                 = pagarMe;
     _servico                 = servico;
     _usuarioRepository       = usuarioRepository;
     _cartaoCreditoRepository = cartaoCreditoRepository;
     _movimentacaoRepository  = movimentacaoRepository;
     _cookieFrete             = cookieFrete;
     _entregaRepository       = entregaRepository;
     _pedidoRepository        = pedidoRepository;
 }
 public HomeController(IEnderecoEntregaRepository repositoryEnderecoEntrega, IClienteRepository repositoryCliente, LoginCliente loginCliente)
 {
     _repositoryEnderecoEntrega = repositoryEnderecoEntrega;
     _repositoryCliente         = repositoryCliente;
     _loginCliente = loginCliente;
 }
 public HomeController(IPessoaRepository pessoaRepository, LoginCliente loginCliente, IEnderecoEntregaRepository enderecoEntregaRepository)
 {
     _pessoaRepository          = pessoaRepository;
     _loginCliente              = loginCliente;
     _enderecoEntregaRepository = enderecoEntregaRepository;
 }
示例#13
0
 public HomeController(IClienteRepository clienteRepository, LoginCliente loginCliente, IEnderecoEntregaRepository endereco)
 {
     _clienteRepository         = clienteRepository;
     _loginCliente              = loginCliente;
     _enderecoEntregaRepository = endereco;
 }
 public EnderecoEntregaController(LoginCliente loginCliente, IEnderecoEntregaRepository enderecoEntregaRepository)
 {
     _loginCliente = loginCliente;
     _enderecoEntregaRepository = enderecoEntregaRepository;
 }
示例#15
0
 public HomeController(LoginCliente loginCliente, IClienteRepository repository, IEnderecoEntregaRepository endereco)
 {
     _loginCliente = loginCliente;
     _repository   = repository;
     _endereco     = endereco;
 }
示例#16
0
 public CarrinhoCompraController(IEnderecoEntregaRepository enderecoEntregaRepository, LoginCliente loginCliente, GerenciadorCookie cookie, CarrinhoCompra carrinhoCompra, IProdutoRepository produtoRepository, IMapper mapper) : base(carrinhoCompra, produtoRepository, mapper, cookie)
 {
     _enderecoEntregaRepository = enderecoEntregaRepository;
     _loginCliente = loginCliente;
 }
示例#17
0
 public CarrinhoCompraController(LoginCliente loginCliente, IEnderecoEntregaRepository enderecoEntregaRepository, GerenciadorCookie cookie, CarrinhoCompra carrinhoCompra, IProdutoRepository produtoRepository, IMapper mapper, WSCalcularFrete frete, WSCalcularPacote pacote, CookieValorPrazoFrete cookieValorPrazoFrete) : base(carrinhoCompra, produtoRepository, mapper, frete, pacote, cookieValorPrazoFrete, cookie)
 {
     _enderecoEntregaRepository = enderecoEntregaRepository;
     _loginCliente = loginCliente;
 }
示例#18
0
 // UM CONSTRUTOR SIMPLES
 public CarrinhoController(LoginCliente loginCliente, IEnderecoEntregaRepository enderecoEntregaRepository, CookieCarrinhoCompra carrinhocompra, IProdutoRepository produtorepository, IMapper mapper, WSCorreiosCalcularFrete wsorreiosCalcularFrete, CalcularPacote calcularpacote, CookieValorPrazoFrete cookieValorPrazoFrete) : base(carrinhocompra, produtorepository, mapper, wsorreiosCalcularFrete, calcularpacote, cookieValorPrazoFrete)
 {
     _loginCliente = loginCliente;
     _enderecoEntregaRepository = enderecoEntregaRepository;
 }
 public EnderecoEntregaController(IEnderecoEntregaRepository entregaRepository, ITokenService tokenService)
 {
     _entregaRepository = entregaRepository;
     _tokenService      = tokenService;
 }
示例#20
0
 public CarrinhoCompraController(LoginCliente login, CookieCarrinhoCompra carrinhoCompra,
                                 IProdutoRepository produtoRepository, IMapper mapper, IEnderecoEntregaRepository endereco,
                                 WSCorreiosCalcularFrete wSCorreios, CalcularPacote calcular,
                                 CookieFrete cookieValorPrazoFrete, IEnderecoEntregaRepository enderecoEntrega, LoginCliente loginCliente) : base(carrinhoCompra, produtoRepository, mapper, wSCorreios, calcular, cookieValorPrazoFrete, enderecoEntrega, loginCliente)
 {
 }