private void btnSearchQuery_Click(object sender, EventArgs e) { systemName = this.cbxSystemList.Text.Trim(); QueryHelper helper = new QueryHelper(systemName); area = checkStandard.Checked == true ? WorkSpace.StandardArea : WorkSpace.GlobalArea; userGroup = this.cbxUserGroup.Text.Trim(); string searchString = cbxQueries.Text; if (string.IsNullOrEmpty(searchString)) { searchString = "*"; } SearchResultQueryDataTable dt = helper.SearchForQueries(area, userGroup, searchString, "*"); cbxQueries.DataSource = null; cbxQueries.DataSource = dt; cbxQueries.DisplayMember = "QueryName"; this.dgvSearchResult.DataSource = null; this.dgvSearchResult.DataSource = dt; }
private void btnSearchVariant_Click(object sender, EventArgs e) { systemName = this.cbxSystemList.Text.Trim(); QueryHelper helper = new QueryHelper(systemName); area = checkStandard.Checked == true ? WorkSpace.StandardArea : WorkSpace.GlobalArea; userGroup = this.cbxUserGroup.Text.Trim(); queryName = this.cbxQueries.Text.Trim(); SearchResultVariantsDataTable dt = helper.SearchForVariants(area, userGroup, queryName); cbxVariants.DataSource = null; cbxVariants.DataSource = dt; cbxVariants.DisplayMember = "VariantName"; this.dgvSearchResult.DataSource = null; this.dgvSearchResult.DataSource = dt; }