Exemplo n.º 1
0
        public void AddTable(string tableName, Dictionary <string, Type> myData)
        {
            XmlTable xmldt = new XmlTable();

            xmldt.CreateTable(tableName, myData);

            if (xmldt != null)
            {
                ListDataObjects.Add(xmldt);
                Ds.Tables.Add(xmldt.Dt);
            }
        }
Exemplo n.º 2
0
        public void LoadXmlDb()
        {
            this.ClearData();
            if (File.Exists(DataBasePathFile))
            {
                Ds.ReadXml(DataBasePathFile);

                foreach (DataTable dt in Ds.Tables)
                {
                    XmlTable myXmlData = new XmlTable
                    {
                        TableName = dt.TableName,
                        Dt        = dt
                    };

                    foreach (DataColumn dc in dt.Columns)
                    {
                        myXmlData.Properties.Add(dc.ColumnName, dc.DataType);
                    }

                    ListDataObjects.Add(myXmlData);
                }
            }
        }
Exemplo n.º 3
0
 internal XmlLog(string pathFile, string tableName, Dictionary <string, Type> Fields)
 {
     PathFile      = pathFile;
     LogDataObject = new XmlTable();
     LogDataObject.CreateTable(tableName, Fields);
 }