Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
 public override string ToString()
 {
     if (ObjectName != null)
     {
         return(ObjectName.ToString());
     }
     return(base.ToString());
 }
Exemplo n.º 3
0
        public static void PutProgrammable(this DatabaseCache cache, NameWithSchema obj, DataTable value)
        {
            string key = obj != null?obj.ToString() : "@#all";

            cache.Put("mssql.programmable", key, value);
        }
Exemplo n.º 4
0
        public static DataTable GetProgrammable(this DatabaseCache cache, NameWithSchema obj)
        {
            string key = obj != null?obj.ToString() : "@#all";

            return((DataTable)cache.Get("mssql.programmable", key));
        }
Exemplo n.º 5
0
 public override string ToString()
 {
     return("RENAME " + OldObject.ToString() + "->" + NewName.ToString());
 }
Exemplo n.º 6
0
        public static void PutSource(this DatabaseCache cache, NameWithSchema obj, DataTable value)
        {
            string key = obj != null?obj.ToString() : "@#all";

            cache.Put("oracle.source", key, value);
        }
Exemplo n.º 7
0
        public static DataTable GetSource(this DatabaseCache cache, NameWithSchema obj)
        {
            string key = obj != null?obj.ToString() : "@#all";

            return((DataTable)cache.Get("oracle.source", key));
        }