Exemplo n.º 1
0
        /// <summary>
        /// processaInfAdic
        /// </summary>
        /// <param name="nodeinfNFe"></param>
        private void processaInfAdic(XmlNode nodeinfNFe)
        {
            nfe.InfAdic.infAdFisco = this.readValue(nodeinfNFe, TpcnResources.infAdFisco);
            nfe.InfAdic.infCpl = this.readValue(nodeinfNFe, TpcnResources.infCpl);
            foreach (XmlNode noder in nodeinfNFe.ChildNodes)
            {
                switch (noder.LocalName)
                {
                    case "obsCont":
                        {
                            obsCont obscontInfo = new obsCont();
                            obscontInfo.xCampo = noder.Attributes[TpcnResources.xCampo.ToString()].Value;
                            obscontInfo.xTexto = this.readValue(noder, TpcnResources.xTexto);
                            nfe.InfAdic.obsCont.Add(obscontInfo);
                        }
                        break;

                    case "obsFisco":
                        {
                            obsFisco obsfiscoInfo = new obsFisco();
                            obsfiscoInfo.xCampo = noder.Attributes[TpcnResources.xCampo.ToString()].Value;
                            obsfiscoInfo.xTexto = this.readValue(noder, TpcnResources.xTexto);
                            nfe.InfAdic.obsFisco.Add(obsfiscoInfo);
                        }
                        break;

                    case "procRef":
                        {
                            procRef procrefInfo = new procRef();
                            procrefInfo.nProc = this.readValue(noder, TpcnResources.nProc);
                            procrefInfo.indProc = this.readValue(noder, TpcnResources.indProc);
                            nfe.InfAdic.procRef.Add(procrefInfo);
                        }
                        break;
                }
            }
        }