Fórum Dúvida ao abrir xml NFE utilizando xsd #532032
17/09/2015
0
Tentei adicionar o CNPJ e seu método get e set na classe correspondente, porém não consegui trazer está informação. Preciso trazer cada campo do XML em um item diferente do formulário.
Abaixo o Deserializador
NFEXML é o nome do stream.
TNfeProc NFEProc = new TNfeProc();
XmlSerializer Serializador = new XmlSerializer(typeof(TNfeProc));
NFEProc = (TNfeProc)Serializador.Deserialize(NFEXML);
Alguns campos como a IE eu consigo trazer conforme o exemplo abaixo
TextBox1.Text = NFEProc.NFe.infNFe.emit.IE.ToString();
XML:
<emit>
<CNPJ>57220652000104</CNPJ>
<xNome>COM LTDA</xNome>
<xFant>COM LTDA</xFant>
<enderEmit>
<xLgr>RUA DIO</xLgr>
<nro>507</nro>
<xBairro>PROSPERIDADE</xBairro>
<cMun>3548807</cMun>
<xMun>XXXXXXXXX</xMun>
<UF>SP</UF>
<CEP>09550180</CEP>
<cPais>1058</cPais>
<xPais>BRASIL</xPais>
<fone>1142235200</fone>
</enderEmit>
<IE>636095822512</IE>
<CRT>3</CRT>
</emit>
Alguém tem idéia de como trazer o CNPJ?

Tiago Martins
Curtir tópico
+ 0Posts
23/09/2015
Tiago Martins
Gostei + 0
23/10/2015
Tiago Martins
Gostei + 0
11/03/2019
Henry Ricatto
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)