예제 #1
0
파일: EnviaXML.cs 프로젝트: ertprs/Estudo
        public static XmlNode ObterXmlConsultaProtocoloNFCe(NotaFiscal notaFiscal, XmlDocument xmlConsultaProtocoloNFCe)
        {
            var uf = LojaDAO.Instance.GetUf(notaFiscal.IdLoja.Value)?.ToUpper() ?? string.Empty;

            if (ConfigNFe.TipoAmbiente == ConfigNFe.TipoAmbienteNfe.Producao)
            {
                return(GetWebService.NFCeConsultaProtocoloProducao(notaFiscal, null, uf).nfeConsultaNF(xmlConsultaProtocoloNFCe));
            }
            else if (ConfigNFe.TipoAmbiente == ConfigNFe.TipoAmbienteNfe.Homologacao)
            {
                return(GetWebService.NFCeConsultaProtocoloHomologacao(notaFiscal, null, uf).nfeConsultaNF(xmlConsultaProtocoloNFCe));
            }

            return(null);
        }