Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions CTe.Servicos/Eventos/ServicoController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,7 @@ public retEventoCTe Executar(CTeTipoEvento cTeTipoEvento, int sequenciaEvento, s
return retorno;
}

public async Task<retEventoCTe> ExecutarAsync(CTeTipoEvento cTeTipoEvento,
int sequenciaEvento,
string chave, string
cnpj, EventoContainer container,
ConfiguracaoServico configuracaoServico = null,
DFe.Classes.Entidades.Estado? cOrgao = null)
public async Task<retEventoCTe> ExecutarAsync(CTeTipoEvento cTeTipoEvento, int sequenciaEvento, string chave, string cnpj, EventoContainer container, ConfiguracaoServico configuracaoServico = null, DFe.Classes.Entidades.Estado? cOrgao = null)
{
var configServico = configuracaoServico ?? ConfiguracaoServico.Instancia;

Expand All @@ -86,13 +81,13 @@ public async Task<retEventoCTe> ExecutarAsync(CTeTipoEvento cTeTipoEvento,
if (evento.versao == versao.ve200 || evento.versao == versao.ve300)
{
var webService = WsdlFactory.CriaWsdlCteEvento(configServico, ufUrl: cOrgao);
retornoXml = await webService.cteRecepcaoEvento(evento.CriaXmlRequestWs());
retornoXml = webService.cteRecepcaoEvento(evento.CriaXmlRequestWs());
}

if (evento.versao == versao.ve400)
{
var webService = WsdlFactory.CriaWsdlCteEventoV4(configServico, ufUrl: cOrgao);
retornoXml = await webService.cteRecepcaoEvento(evento.CriaXmlRequestWs());
retornoXml = webService.cteRecepcaoEvento(evento.CriaXmlRequestWs());
}

var retorno = retEventoCTe.LoadXml(retornoXml.OuterXml, evento);
Expand Down
Loading