private void btnAddValuesFromValuepool_Click(object sender, EventArgs e) { ChooseValues frmChooseValues = new ChooseValues(); List <PxValue> valueList = VariableFacade.GetValuesByValuePool(_valueSet.ValuePool); foreach (var val in _valueSet.Values) { PxValue value = PxValueSet.GetValue(valueList, val.ValueCode); if (value != null) { valueList.Remove(value); } } frmChooseValues.DataSource = valueList; if (frmChooseValues.ShowDialog() == System.Windows.Forms.DialogResult.OK) { List <PxValue> selectedValues = frmChooseValues.SelectedValues; foreach (var sv in selectedValues) { _valueSet.Values.Add(sv); } } }
private void btnAddValuesFromValuepool_Click(object sender, EventArgs e) { ChooseValues frmChooseValues = new ChooseValues(); List<PxValue> valueList = VariableFacade.GetValuesByValuePool(_valueSet.ValuePool); foreach (var val in _valueSet.Values) { PxValue value = PxValueSet.GetValue(valueList, val.ValueCode); if (value != null) { valueList.Remove(value); } } frmChooseValues.DataSource = valueList; if (frmChooseValues.ShowDialog() == System.Windows.Forms.DialogResult.OK) { List<PxValue> selectedValues = frmChooseValues.SelectedValues; foreach (var sv in selectedValues) { _valueSet.Values.Add(sv); } } }