private void SaveAsXML()
        {
            System.Xml.XmlDocument oXmlDoc = null;
            oXmlDoc = new System.Xml.XmlDocument();
            string sXmlString = null;

            sXmlString = oForm.GetAsXML();

            oXmlDoc.LoadXml(sXmlString);

            string sPath = null;

            sPath = System.IO.Directory.GetParent(Application.StartupPath).ToString();

            oXmlDoc.Save(sPath + @"\FormSimples.xml");

            oApplication.SetStatusBarMessage("Dir:" + sPath, SAPbouiCOM.BoMessageTime.bmt_Short, false);
        }
示例#2
0
    private void SaveAsXML(ref SAPbouiCOM.Form Form)
    {
        System.Xml.XmlDocument oXmlDoc = null;
        string sXmlString = null;

        oXmlDoc = new System.Xml.XmlDocument();

        // get the form as an XML string
        sXmlString = Form.GetAsXML();

        // load the form's XML string to the
        // XML document object
        oXmlDoc.LoadXml(sXmlString);



        // save the XML Document
        oXmlDoc.Save((@"e:\22.xml"));
    }
        public void crearForma()
        {
            //se comprueba que la forma no este creada para poder
            //crear una forma
            try
            {
                forma = app.Forms.Item("FSDC");
            }
            catch
            {
                // se carga el archivo desde el xml
                string xmlCargado = Config.getConfig().cargarDesdeXML("FSolicitud de compra.srf");
                app.LoadBatchActions(ref xmlCargado);
                forma = app.Forms.Item("FSDC");

                crearChooseFromList();
                llenarComboBox();
                setFecha();
                setMatrix();
                setImpuesto();

                // se posiciona el campo proveedor como
                // el primer campo activo de la forma
                forma.ActiveItem = "txtCodProv";

                // el browseby activa las flechas de navegacion
                // para navegar entre documentos ya procesados
                forma.DataBrowser.BrowseBy = "txtDcEntry";

                // se asigna el indice a la columna
                setColCount();
                forma.Visible = true;
                app.SetStatusBarMessage("Se inicializado del Add-On", SAPbouiCOM.BoMessageTime.bmt_Short, false);

                // se guarda el elemento xml
                Config.getConfig().guardarComoXML(forma.GetAsXML(), "FSolicitud de compra.xml");
            }
            app.ItemEvent += new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler(app_ItemEvent);
        }
示例#4
0
        public void crearForma()
        {
            try
            {
                forma = app.Forms.Item("FLSC");
            }
            catch
            {
                // se carga el archivo desde el xml
                string xmlCargado = Config.getConfig().cargarDesdeXML("FLista de Solicitudes.srf");
                app.LoadBatchActions(ref xmlCargado);
                forma = app.Forms.Item("FLSC");

                forma.Visible = true;

                getDataFromDataSource();

                //se guarda la forma en xml
                Config.getConfig().guardarComoXML(forma.GetAsXML(), "FLista de Solicitudes.xml");
            }
            app.ItemEvent += new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler(app_ItemEvent);
        }