Exemplo n.º 1
0
        public void RefreshXml()
        {
            _ddc.Tables = StaticTreeClass.GetAllTableObjectsComplete(_dbReg);
            _ddc.Views  = StaticTreeClass.GetViewObjects(_dbReg);
            StaticTreeClass.GetAllTablePrimaryKeyObjects(_dbReg, _ddc.Tables);
            _ddc.Database = _dbReg;
            var fs         = new FileStream(Application.StartupPath + "\\temp\\tmp.xml", FileMode.Create);
            var serializer = new ConfigurationContainer().Create();
            var xml        = serializer.Serialize(fs, _ddc);



//            var serializer = new XmlSerializer(typeof(DatabaseDesignClass));
            //  var fs = new FileStream(Application.StartupPath + "\\temp\\tmp.xml", FileMode.Create);
            //serializer.Serialize(_ddc,Application.StartupPath + "\\temp\\tmp.xml");
            fs.Close();
            xmlEditStruktur.LoadXmlFromFile(Application.StartupPath + "\\temp\\tmp.xml");
        }