Пример #1
0
        public Table loadTable(string tableName)
        {
            Table table = new Table(IO.LoadXMLTable(tableName, CoreDB.getPath()), tableName);

            Tables.Add(table);
            return(table);
        }
Пример #2
0
 internal void addTableNameToList(string tableName)
 {
     IncreaseHead();
     xTable.Root.Add(new XElement("Table", tableName));
     Names.Add(tableName);
     new TableIO().Save("table_list", CoreDB.getPath(), xTable);
 }
Пример #3
0
 internal void removeReferencePrefix(string tableName)
 {
     try
     {
         xTable.Root.Elements().First(element => element.Value == tableName).Attribute("FOREIGN_KEY").Remove();
         new TableIO().Save("table_list", CoreDB.getPath(), xTable);
     }
     catch { }
 }
Пример #4
0
 public Table(XDocument xdoc, string tableName)
 {
     Columns         = new List <Column>();
     this._xDocument = xdoc;
     path            = CoreDB.getPath();
     this.tableName  = tableName;
     entity          = new Entity(_xDocument.Root.Element("Entity"));
     InitializeColumns();
     InitializeLines();
     InitializeColumnLine();
 }
Пример #5
0
 internal void addReferencePrefix(string tableName)
 {
     xTable.Root.Elements().First(element => element.Value == tableName).Add(new XAttribute("FOREIGN_KEY", ""));
     new TableIO().Save("table_list", CoreDB.getPath(), xTable);
 }
Пример #6
0
 internal void SaveTable()
 {
     new TableIO().Save("table_list", CoreDB.getPath(), xTable);
 }