public void Initilaze() { BaseSqlTest.SeedDeleteDatabase(); BaseSqlTest.SeedInsertDatabase(); _repository = new VendaSqlRepository(); _service = new VendaService(_repository); }
public VendaAppService(IUnitOfWork uow, IVendaService service, IDiscoVendaAppService discoVendaAppService, IDiscoAppService discoAppService, ICashBackAppService cashBackAppService, IMapper mapper) : base(uow, service, mapper) { _service = service; _discoVendaAppService = discoVendaAppService; _discoAppService = discoAppService; _cashBackAppService = cashBackAppService; }
public VendaTask(IVendaService vendaService) { _vendaService = vendaService; CaminhoPastaDeVendas = ConfigurationManager.AppSettings["CaminhoPastaVendas"]; CaminhoPastaDeVendasValidas = ConfigurationManager.AppSettings["CaminhoPastaVendasValidas"]; CaminhoPastaDeVendasInvalidas = ConfigurationManager.AppSettings["CaminhoPastaVendasInvalidas"]; }
public VendaController(ICategoriaRepository categoriaRepository, IProdutoRepository produtoRepository, IVendaRepository vendaRepository, IVendaService vendaService, IVendaMapper vendaMapper) { _categoriaRepository = categoriaRepository; _produtoRepository = produtoRepository; _vendaRepository = vendaRepository; _vendaService = vendaService; _vendaMapper = vendaMapper; }
public JobsController(ApplicationDbContext dbContext, INotaFiscalService notaFiscalService, IEmailService emailService, IVendaService vendaService) { _dbContext = dbContext; _notaFiscalService = notaFiscalService; _emailService = emailService; _vendaService = vendaService; }
public VendasController(IMapper mapper, IVendaService vendaService, IVendaRepository vendaRepository, IClienteRepository clienteRepository, INotificador notificador) : base(notificador) { _mapper = mapper; _vendaService = vendaService; _vendaRepository = vendaRepository; }
public Form1(IVendaService vendaService) { InitializeComponent(); _service = vendaService; CaminhoPastaDeVendas = ConfigurationManager.AppSettings["CaminhoPastaVendas"]; CaminhoPastaDeVendasValidas = ConfigurationManager.AppSettings["CaminhoPastaVendasValidas"]; CaminhoPastaDeVendasInvalidas = ConfigurationManager.AppSettings["CaminhoPastaVendasInvalidas"]; PopularListas(); }
public VendasController(IVendaService vendaService, UserManager <IdentityUser> userManager, IVendaRepository vendaRepository, IMapper mapper, INotificador notificador, IUser user) : base(notificador, user) { _vendaRepository = vendaRepository; _vendaService = vendaService; _mapper = mapper; _userManager = userManager; }
public async Task <IActionResult> TransportadoraEntregarVenda(int Id, [FromServices] IVendaService service) { try { await service.TransportadoraEntregarVenda(Id); return(Ok("Produto entregue com sucesso!")); } catch (Exception e) { return(BadRequest(e)); } }
public VendasController(IVendaRepository vendaRepository, IVendaService vendaService, IProdutoRepository produtoRepository, IClienteRepository clienteRepository, IMapper mapper, INotificador notificador) : base(notificador) { _vendaRepository = vendaRepository; _vendaService = vendaService; _produtoRepository = produtoRepository; _clienteRepository = clienteRepository; _mapper = mapper; }
public async Task <IActionResult> CancelarVenda(int Id, [FromServices] IVendaService service) { try { await service.CancelarVenda(Id); return(Ok("Venda cancelada com sucesso!")); } catch (Exception e) { return(BadRequest(e)); } }
public LojaDiscoController(IAlbumService albumService, IPrecoService precoService, IVendaService vendaService) { _albumService = albumService; _precoService = precoService; _vendaService = vendaService; var precos = _precoService.ListaPrecos(); if (precos.Count() == 0) { _precoService.GravarPrecoAlbum(); } }
public async Task <IActionResult> PagamentoAprovado(int Id, [FromServices] IVendaService service) { try { await service.PagamentoAprovado(Id); return(Ok("Pagamento aprovado com sucesso!")); } catch (Exception e) { return(BadRequest(e)); } }
public async Task <IActionResult> EnviarVendaParaTransportadora(int Id, [FromServices] IVendaService service) { try { await service.EnviarVendaParaTransportadora(Id); return(Ok("Pagamento enviado para a transportadora com sucesso!")); } catch (Exception e) { return(BadRequest(e)); } }
public async Task <IActionResult> Nova([FromServices] IVendaService service) { var tsc = new TaskCompletionSource <IActionResult>(); try { var result = service.NovaVenda(); tsc.SetResult(RetornoHelper.CreateResponse(result, 200)); } catch (Exception e) { tsc.SetResult(RetornoHelper.CreateResponse(e.Message, 500)); } return(await tsc.Task); }
public async Task <IActionResult> removerItem([FromServices] IVendaService service, [FromBody] RemoverItemRequest req) { var tsc = new TaskCompletionSource <IActionResult>(); try { service.RemoverItem(req.VendaId, req.ItemId); tsc.SetResult(RetornoHelper.CreateResponse("OK", 200)); } catch (Exception e) { tsc.SetResult(RetornoHelper.CreateResponse(e.Message, 500)); } return(await tsc.Task); }
public VendaController(IVendaService service) { _service = service; }
public VendaController(IVendaService vendaService) { _vendaService = vendaService; }
public VendaController(IVendaService vendaApplication, IMapper mapper) : base(mapper, vendaApplication, NOME_SERVICO) { _vendaApplication = vendaApplication; _mapper = mapper; }
/// <summary> /// Construtor da Classe /// </summary> /// <param name="vendaservice"></param> public CompraController(IVendaService vendaservice) { _vendaService = vendaservice; }
public VendaServiceTests() { sqlAdapterMock = new Mock <IVendaSqlAdapter>(); vendaService = new VendaService(sqlAdapterMock.Object); }
public void Initialize() { service = new VendaService(vendaRepository, impostoRepository, veiculoRepository); }
public VendasController(IVendaService vendaService) { this._vendaService = vendaService; }
public VendaAppService(IVendaService vendaService) : base(vendaService) { _vendaService = vendaService; }
public VendaController(IVendaService vendaService, IMapper mapper) { _vendaService = vendaService; _mapper = mapper; }
public VendaAppService(IVendaService vendaService) { this.vendaService = vendaService; }
public VendaAppService(IVendaService service, IProdutoService serviceProduto, IClienteService serviceCliente) { this._service = service; this._serviceProduto = serviceProduto; this._serviceCliente = serviceCliente; }
public VendasController(IVendaService service) : base(service) { this.service = service; }
public LivrosController(IAnuncioService anuncioService, IUsuarioService usuarioService, IVendaService vendaService) { _anuncioService = anuncioService; _usuarioService = usuarioService; _vendaService = vendaService; }
public HomeController(ApplicationDbContext context, INotaFiscalService notaFiscalService, IVendaService vendaService) { _context = context; _notaFiscalService = notaFiscalService; _vendaService = vendaService; }