示例#1
0
 private void ShowProc(DBSource dBSource, string dbname, string procname, string procbody)
 {
     UC.SQLCodePanel panel = new SQLCodePanel();
     panel.SetCode(dbname, procbody);
     panel.Text = $"存储过程-{procname}";
     this.TabControl.TabPages.Add(panel);
     this.TabControl.SelectedTab = panel;
 }
示例#2
0
        private void ShowViewSql(DBSource source, string dbname, string viewname, string sql)
        {
            var title = $"视图{dbname}.{viewname}";

            foreach (TabPage page in this.TabControl.TabPages)
            {
                if (page.Text == title)
                {
                    TabControl.SelectedTab = page;
                    return;
                }
            }
            var tip = $"视图{dbname}.{viewname}-{source.ServerName}";

            UC.SQLCodePanel panel = new SQLCodePanel();
            panel.ToolTipText = tip;
            panel.SetCode(dbname, sql);
            panel.Text = title;
            this.TabControl.TabPages.Add(panel);
            this.TabControl.SelectedTab = panel;
        }