Esempio n. 1
0
        private XmlNode contato()
        {
            if (this.Contato == null)
            {
                throw new InvalidOperationException("sem contato");
            }

            XmlElement e = XmlDoc.CreateElement("contato");

            e.AppendChild(CreateElement("nmCtt", this.Contato.nmCtt));
            e.AppendChild(CreateElement("cpfCtt", FormatadorReinf.FormatarCPFCNPJCNO(this.Contato.cpfCtt)));
            if (!string.IsNullOrEmpty(this.Contato.foneFixo))
            {
                e.AppendChild(CreateElement("foneFixo", FormatadorReinf.FormatarTelefone(this.Contato.foneFixo)));
            }
            if (!string.IsNullOrEmpty(this.Contato.foneCel))
            {
                e.AppendChild(CreateElement("foneCel", FormatadorReinf.FormatarTelefone(this.Contato.foneCel)));
            }
            if (!string.IsNullOrEmpty(this.Contato.email))
            {
                e.AppendChild(CreateElement("email", this.Contato.email));
            }
            return(e);
        }
Esempio n. 2
0
        private XmlNode softHouse()
        {
            XmlElement e = XmlDoc.CreateElement("softHouse");

            e.AppendChild(CreateElement("cnpjSoftHouse", FormatadorReinf.FormatarCPFCNPJCNO(this.SoftwareHouse.cnpjSoftHouse)));
            e.AppendChild(CreateElement("nmRazao", this.SoftwareHouse.nmRazao));
            e.AppendChild(CreateElement("nmCont", this.SoftwareHouse.nmCont));
            if (!string.IsNullOrEmpty(this.SoftwareHouse.telefone))
            {
                e.AppendChild(CreateElement("telefone", FormatadorReinf.FormatarTelefone(this.SoftwareHouse.telefone)));
            }
            if (!string.IsNullOrEmpty(this.SoftwareHouse.email))
            {
                e.AppendChild(CreateElement("email", this.SoftwareHouse.email));
            }
            return(e);
        }