示例#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);
 }