public void PopupFilter(out string sql, out Dictionary <string, object> pars) { using (frmQueryFilter qf = new frmQueryFilter()) { qf.ShowQueryFilter(this, _dbHelper, _queryScheme, out sql, out pars); } }
/// <summary> /// 显示查询 /// </summary> /// <param name="dbHelper"></param> public void ShowQuery(IDBQuery dbHelper) { string queryScheme = SaveToString(); string sql = ""; Dictionary <string, object> pars = null; if (qcReview.Query.GetInputCount() <= 0) { qcReview.Query.CreateQuerySql(out sql, out pars); } else { using (frmQueryFilter qf = new frmQueryFilter()) { qf.ShowQueryFilter(this, dbHelper, queryScheme, out sql, out pars); } } //显示数据展现窗口 if (dbHelper == null) { MessageBox.Show("数据库未链接,不能执行如下查询:" + System.Environment.NewLine + sql, "提示"); return; } if (string.IsNullOrEmpty(sql)) { MessageBox.Show("未获取到有效的查询语句。", "提示"); return; } using (DataTable dtResult = dbHelper.ExecuteSQL(sql, pars)) using (frmQueryResult qr = new frmQueryResult()) { qr.ShowResult(this, dtResult); } }