NFe.ConvertTxt.NFeW.GerarRetirada C# (CSharp) Method

GerarRetirada() private method

GerarRetirada
private GerarRetirada ( NFe NFe, XmlElement root ) : void
NFe NFe
root System.Xml.XmlElement
return void
        private void GerarRetirada(NFe NFe, XmlElement root)
        {
            if (!string.IsNullOrEmpty(NFe.retirada.xLgr))
            {
                XmlElement el = doc.CreateElement("retirada");
                root.AppendChild(el);
                nodeCurrent = el;

                if (!string.IsNullOrEmpty(NFe.retirada.CNPJ))
                    wCampo(NFe.retirada.CNPJ, TpcnTipoCampo.tcStr, TpcnResources.CNPJ);
                else
                    wCampo(NFe.retirada.CPF, TpcnTipoCampo.tcStr, TpcnResources.CPF);
                wCampo(NFe.retirada.xLgr, TpcnTipoCampo.tcStr, TpcnResources.xLgr);
                wCampo(NFe.retirada.nro, TpcnTipoCampo.tcStr, TpcnResources.nro);
                wCampo(NFe.retirada.xCpl, TpcnTipoCampo.tcStr, TpcnResources.xCpl, ObOp.Opcional);
                wCampo(NFe.retirada.xBairro, TpcnTipoCampo.tcStr, TpcnResources.xBairro);
                wCampo(NFe.retirada.cMun, TpcnTipoCampo.tcInt, TpcnResources.cMun, ObOp.Obrigatorio, 7);
                wCampo(NFe.retirada.xMun, TpcnTipoCampo.tcStr, TpcnResources.xMun);
                wCampo(NFe.retirada.UF, TpcnTipoCampo.tcStr, TpcnResources.UF);
            }
        }