private void btnSearch_Click(object sender, EventArgs e) { if (valueObject == null) { return; } string SearchParam = valueObject.SearchParam; string sql = valueObject.ListSql; Hashtable ht = new Hashtable(); //用户界面参数和值 foreach (Control ctrl in FLPannel.Controls) { if (ctrl is ORG.UILib.Controls.PanelEx) { ORG.UILib.Controls.TextBoxEx txt = ctrl.Controls["txt_0"] as ORG.UILib.Controls.TextBoxEx; ht.Add(txt.Tag.ToString(), txt.Text); } } //系统参数和值; PropertyGrid.Item.SysValue sv = new Item.SysValue(); foreach (TxtValObject tv in sv.ValueList) { string key = tv.Val; if (sql.IndexOf(":" + key) > -1) { ht.Add(":" + key, sv.GetValue(key)); } } BLL.STIM_CONFIG bll = new BLL.STIM_CONFIG(); DataSet ds = bll.getSearchResult(valueObject.ListSql, ht); if (ds != null && ds.Tables.Count > 0) { DGVList.DataSource = ds.Tables[0].DefaultView; } }