public void ShowSQLQuery(ShowSQLQueryEvent e) { var query = new SQLQueryView(); query.Dock = DockStyle.Fill; DockContent dc = new DockContent(); dc.Text = "查询"; dc.Controls.Add(query); dc.Show(this.dockPanel, DockState.Document); if (!string.IsNullOrEmpty(e.SQL)) { query.Query(e.SQL); } }
/// <summary> /// SQL查询 /// </summary> private void tsBtnQuery_Click(object sender, EventArgs e) { if (App.Instance.DBLink == null) { return; } ShowSQLQueryEvent evt = new ShowSQLQueryEvent(); AppEvent.Publish(evt); }
private void ShowSQLQuery(string sql) { ShowSQLQueryEvent evt = new ShowSQLQueryEvent(); evt.SQL = sql; AppEvent.Publish(evt); }