private void ValueBox3_DropDown(object sender, EventArgs e) { if (string.IsNullOrEmpty(XZQMC)) { return; } if (string.IsNullOrEmpty(_tableName)) { return; } if (this.FieldBox3.SelectedItem == null) { return; } var fieldName = GetName(this.FieldBox3.SelectedItem.ToString()); var field = _fields.FirstOrDefault(i => i.Name.ToLower() == fieldName.ToLower()); if (field as object == null || field.Type == FieldType.Float) { return; } if (_currentFile == null) { return; } var values = ADOSQLHelper.GetUniqueValue(_currentFile.FullName, _tableName, fieldName); this.ValueBox3.Items.Clear(); this.ValueBox3.Items.AddRange(values.ToArray()); }
private void comboBox5_DropDown(object sender, EventArgs e) { if (string.IsNullOrEmpty(XZQMC)) { return; } if (string.IsNullOrEmpty(_tableName)) { return; } if (this.FieldBox1.SelectedItem == null) { return; } var fieldName = GetName(this.FieldBox1.SelectedItem.ToString()); if (string.IsNullOrEmpty(fieldName)) { return; } var field = _fields.FirstOrDefault(i => i.Name.ToLower() == fieldName.ToLower()); if (field as object == null || field.Type == FieldType.Float) { return; } var file = _currentFile; if (file == null) { MessageBox.Show(string.Format("未读取分析到{0}对应的矢量数据文件,请核对", XZQMC)); return; } var values = ADOSQLHelper.GetUniqueValue(file.FullName, _tableName, fieldName); this.ValueBox1.Items.Clear(); this.ValueBox1.Items.AddRange(values.ToArray()); }