public static GerenciadorNfe GetInstance()
        {
            if (gNFe == null)
            {
                gNFe = new GerenciadorNfe();
            }

            return(gNFe);
        }
Beispiel #2
0
        public TNfeProc DesserializarNota(string arquivo)
        {
            try
            {
                TNfeProc nfe = new TNfeProc();

                GerenciadorNfe gerenciadorNfe = new GerenciadorNfe();

                nfe = gerenciadorNfe.LerNFE(arquivo);

                return(nfe);
            }
            catch (Exception ex)
            {
                MessageBox.Show(String.Format("Não foi possível desserializar nota. Erro: {0}", ex.Message), "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(null);
            }
        }