public Query(string sysName) { this._Name = ""; this._UserGroup = ""; this._Variant = ""; this._Fields = new QueryFieldCollection(); this._SelectionParameters = new QuerySelectionParameterCollection(); this._des = SAPDestination.GetDesByName(sysName); }
private void GetQueryDefinition() { try { WorkSpace area = checkStandard.Checked == true ? WorkSpace.StandardArea : WorkSpace.GlobalArea; SAPConnection con = new SAPConnection(systemName); q = con.CreateQuery(area, userGroup, queryName, variant); // parameterCollection = new QuerySelectionParameterCollection(); parameterCollection = q.SelectionParameters; dgvParameters.Rows.Clear(); DataGridViewComboBoxColumn col = (DataGridViewComboBoxColumn)dgvParameters.Columns["CSELNAME"]; col.DataSource = null; col.DataSource = parameterCollection; col.DisplayMember = "DescriptionText"; q = null; } catch (Exception e) { MessageBox.Show(e.Message); } }