public ModoOnlineService(IEnviaNotaFiscalService enviaNotaFiscalService, IConfiguracaoRepository configuracaoRepository, IConsultaStatusServicoService consultaStatusServicoService, INotaFiscalRepository notaFiscalRepository, IEmiteNotaFiscalContingenciaService emiteNotaFiscalContingenciaService) { _notaFiscalRepository = notaFiscalRepository; _configuracaoRepository = configuracaoRepository; _consultaStatusServicoService = consultaStatusServicoService; enviaNotaFiscalService.NotaEmitidaEmContingenciaEvent += EnviaNotaFiscalServiceEnviaNotaEmitidaEmContingenciaEvent; _emiteNotaFiscalContingenciaService = emiteNotaFiscalContingenciaService; }
public NotaFiscalMainViewModel(IEnviarNota enviarNotaController, OpcoesViewModel opcoesVm, CancelarNotaViewModel notaCanceladaVm, IEnviaNotaFiscalService enviaNotaFiscalService, IConfiguracaoService configuracaoService, ICertificadoService certificadoService, IProdutoService produtoService, IConsultaStatusServicoService consultaStatusServicoService, IEmissorService emissorService, VisualizarNotaEnviadaViewModel visualizarNotaEnviadaViewModel, EnviarEmailViewModel enviarEmailViewModel, INotaFiscalRepository notaFiscalRepository, ModoOnlineService modoOnlineService, INFeConsulta nfeConsulta) { LoadedCmd = new RelayCommand(LoadedCmd_Execute, null); AbrirNFCeCmd = new RelayCommand(AbrirNFCeCmd_Execute, null); AbrirNFeCmd = new RelayCommand(AbrirNFeCmd_Execute, null); VisualizarNotaCmd = new RelayCommand <NotaFiscalMemento>(VisualizarNotaCmd_Execute, null); EnviarNotaNovamenteCmd = new RelayCommand <NotaFiscalMemento>(EnviarNotaNovamenteCmd_ExecuteAsync, null); EnviarEmailCmd = new RelayCommand <NotaFiscalMemento>(EnviarEmailCmd_Execute, null); MudarPaginaCmd = new RelayCommand <int>(MudarPaginaCmd_Execute, null); _enviaNotaFiscalService = enviaNotaFiscalService; _notaFiscalRepository = notaFiscalRepository; _configuracaoService = configuracaoService; _certificadoService = certificadoService; _produtoService = produtoService; _consultaStatusServicoService = consultaStatusServicoService; _emissorService = emissorService; _visualizarNotaEnviadaViewModel = visualizarNotaEnviadaViewModel; _enviarEmailViewModel = enviarEmailViewModel; _nfeConsulta = nfeConsulta; NotasFiscais = new ObservableCollection <NotaFiscalMemento>(); enviarNotaController.NotaEnviadaEvent += EnviarNotaController_NotaEnviadaEventHandler; opcoesVm.ConfiguracaoAlteradaEvent += OpcoesVM_ConfiguracaoAlteradaEventHandler; notaCanceladaVm.NotaCanceladaEvent += NotaFiscalVM_NotaCanceladaEventHandler; notaCanceladaVm.NotaInutilizadaEvent += NotaCanceladaVM_NotaInutilizadaEventHandler; modoOnlineService.NotasTransmitidasEvent += ModoOnlineService_NotasTransmitidasEventHandler; }