private void TableStore_EvntCollectionChanged(object sender, BoolEventArgs e) { //for correct clear from a previous list of tables cmbTables.DataSource = null; cmbTables.Items.Clear(); if (tableStore?.ToList()?.Count > 0) { cmbTables.DataSource = tableStore.ToList(); } }
private void TableStore_EvntCollectionChanged(object sender, BoolEventArgs e) { comboBoxTable.DataSource = null; comboBoxTable.Items.Clear(); comboBoxTable.DataSource = tableStore?.ToList(); if (tableStore?.ToList()?.Count > 0) { comboBoxTable.SelectedIndex = 0; } }
private async Task GetSample(string columnName) { ISQLConnectionSettings newSettings = currentSQLConnectionStore?.GetCurrent(); ModelCommonStringStore models = null; await Task.Run(() => models = SQLSelector.GetDataSample(newSettings, columnName)); if (models?.ToList()?.Count > 0) { sampleStore.Set(models); } else { sampleStore.Reset(); sampleStore.Add(new ModelCommon() { Name = $"В таблице данные отсутствует в столбце '{columnName}'" }); } }
private void SampleStore_EvntCollectionChanged(object sender, BoolEventArgs e) { listBoxSample.DataSource = sampleStore?.ToList(); listBoxSample.Refresh(); }
private void ColumnDeleteStore_EvntCollectionChanged(object sender, BoolEventArgs e) { listBoxColumn.DataSource = columnDeleteStore.ToList(); listBoxColumn.Sorted = true; }