Example #1
0
        public Table loadTable(string tableName)
        {
            Table table = new Table(IO.LoadXMLTable(tableName, CoreDB.getPath()), tableName);

            Tables.Add(table);
            return(table);
        }
Example #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);
 }
Example #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 { }
 }
Example #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();
 }
Example #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);
 }
Example #6
0
 internal void SaveTable()
 {
     new TableIO().Save("table_list", CoreDB.getPath(), xTable);
 }