public void AddTable(NameWithSchema table, Point?pt) { if (m_diagram.FindTable(table) != null) { return; } DiagramTableItem item = new DiagramTableItem(m_diagram); if (pt == null) { item.MustBePlaced = true; } else { item.X = pt.Value.X; item.Y = pt.Value.Y; } try { m_denyDraw = true; m_conn.ClearCaches(); item.Table = (TableStructure)m_conn.GetTable(table).InvokeLoadStructure(TableStructureMembers.AllNoRefs); } finally { m_denyDraw = false; } m_diagram.Tables.Add(item); m_modified = true; drawPanel.Invalidate(); labDragAndDrop.Visible = m_diagram.Tables.Count == 0; Usage.AddSub("add_table", table.ToString()); }
public override string ToString() { if (ObjectName != null) { return(ObjectName.ToString()); } return(base.ToString()); }
public static void PutProgrammable(this DatabaseCache cache, NameWithSchema obj, DataTable value) { string key = obj != null?obj.ToString() : "@#all"; cache.Put("mssql.programmable", key, value); }
public static DataTable GetProgrammable(this DatabaseCache cache, NameWithSchema obj) { string key = obj != null?obj.ToString() : "@#all"; return((DataTable)cache.Get("mssql.programmable", key)); }
public override string ToString() { return("RENAME " + OldObject.ToString() + "->" + NewName.ToString()); }
public static void PutSource(this DatabaseCache cache, NameWithSchema obj, DataTable value) { string key = obj != null?obj.ToString() : "@#all"; cache.Put("oracle.source", key, value); }
public static DataTable GetSource(this DatabaseCache cache, NameWithSchema obj) { string key = obj != null?obj.ToString() : "@#all"; return((DataTable)cache.Get("oracle.source", key)); }