Exemple #1
0
        public void agregaTED(TedModel modeloTed)
        {
            try
            {
                iErr = 0;
                sMsj = string.Empty;

                //Eliminar nodo TSTED vacío
                //XmlNode _xmlNode = _xDocXml.SelectSingleNode("//DTEDefTypeDocumentoTED/DD/TSTED");
                //_xmlNode.ParentNode.RemoveChild(_xmlNode);
                //dteDoc
                //XmlDocumentFragment caf = _xDocXml.CreateDocumentFragment();
                //var x = autorizacionXml.DocumentElement.SelectSingleNode("//AUTORIZACION/CAF");
                //caf.InnerXml = x.OuterXml;
                //_xDocXml.DocumentElement.FirstChild.AppendChild(caf);

                ////Agregar TSTED
                //XmlDocumentFragment timeStamp = _xDocXml.CreateDocumentFragment();
                //timeStamp.InnerXml = "<TSTED>" + ts.ToString("s") + "</TSTED>";
                ////timeStamp.InnerXml = "<TSTED>2003-09-08T12:28:31</TSTED>";
                //_xDocXml.DocumentElement.FirstChild.AppendChild(timeStamp);

                ////Obtener nodo TED/DD
                //_tedDD = _xDocXml.SelectSingleNode("//DTEDefTypeDocumentoTED/DD").OuterXml;
            }
            catch (Exception cf)
            {
                sMsj = "Excepción al agregar CAF. [TedModel.AgregaCAF] " + cf.Message + " " + cf.StackTrace;
                iErr++;
                throw;
            }
        }
Exemple #2
0
        public DteModel(Encoding encoding)
        {
            _encoding        = encoding;
            _dteDoc          = new DTEDefTypeDocumento();
            modeloTed        = new TedModel(encoding);
            _autorizacionXml = new XmlDocument();
            _autorizacionXml.PreserveWhitespace = true;

            _xDocXml = new XmlDocument();
            _xDocXml.PreserveWhitespace = true;

            criptografo = new TecnicaDeEncriptacion();
        }