Exemplo n.º 1
0
        public static XmlNode getXmlCancelamentoNota(XmlDocument aobjXmlDoc, string astrInscricaoMunicipal, X509Certificate2 aobjCertificado, Faturamento aobjFaturamento)
        {
            string lstrStringAssinatura = Convert.ToInt32(astrInscricaoMunicipal).ToString().PadLeft(8, '0') + aobjFaturamento.NumeroNF.ToString().PadLeft(12, '0');

            XmlNode lobjXmlDetalhe = aobjXmlDoc.CreateElement("Detalhe");

            lobjXmlDetalhe.Attributes.Append(aobjXmlDoc.CreateAttribute("xmlns"));

            XmlNode lobjXmlChaveNFe = aobjXmlDoc.CreateElement("ChaveNFe");

            XmlNode lobjXmlInscricao = aobjXmlDoc.CreateElement("InscricaoPrestador");

            lobjXmlInscricao.InnerText = astrInscricaoMunicipal;
            lobjXmlChaveNFe.AppendChild(lobjXmlInscricao);

            XmlNode lobjNumeroNFe = aobjXmlDoc.CreateElement("NumeroNFe");

            lobjNumeroNFe.InnerText = aobjFaturamento.NumeroNF.ToString();
            lobjXmlChaveNFe.AppendChild(lobjNumeroNFe);

            lobjXmlDetalhe.AppendChild(lobjXmlChaveNFe);

            XmlNode lobjAssinatura = aobjXmlDoc.CreateElement("AssinaturaCancelamento");

            lobjAssinatura.InnerText = Certificado.getAssinatura(lstrStringAssinatura, aobjCertificado);
            lobjXmlDetalhe.AppendChild(lobjAssinatura);

            return(lobjXmlDetalhe);
        }
 public void Create(Faturamento faturamento)
 {
     _repositoryFaturamento.Add(faturamento);
 }
 public void Remove(Faturamento faturamento)
 {
     _repositoryFaturamento.Remove(faturamento);
 }
 public void Update(Faturamento faturamento)
 {
     _repositoryFaturamento.Update(faturamento);
 }