void CriarLoteRetornoErro(NFeEnvioRetornoBE obj) { NTLoteErroBLL erro = new NTLoteErroBLL(); erro.Insert(new NTLoteErroBE { lote_id = this.lote.lote_id, LoteErr_Codigo = obj.ErroCodigo, LoteErr_Mensagem = obj.ErroMensagem, LoteErr_Correcao = obj.ErroCorrecao }); }
public NFeEnvioRetornoBE LerXMLLote(string path) { XmlDocument doc = new XmlDocument(); doc.Load(path); NFeEnvioRetornoBE retorno = new NFeEnvioRetornoBE(); if (doc.LastChild.LastChild.Name == "ListaMensagemRetorno") { retorno.Erro = true; retorno.ErroCodigo = doc.LastChild.LastChild.LastChild.ChildNodes[0].InnerText; retorno.ErroMensagem = doc.LastChild.LastChild.LastChild.ChildNodes[1].InnerText; retorno.ErroCorrecao = doc.LastChild.LastChild.LastChild.ChildNodes[2].InnerText; } else { retorno.Erro = false; retorno.NumeroLote = doc.LastChild.ChildNodes[0].InnerText; retorno.DataRecebimento = doc.LastChild.ChildNodes[1].InnerText; retorno.Protocolo = doc.LastChild.ChildNodes[2].InnerText; } return(retorno); }