private async void ClearSelectedDbToolStripMenuItem_Click(object sender, EventArgs e) { listBoxSample.Hide(); EnabledInterface(false); dBOperations.EvntInfoMessage -= DBOperations_EvntInfoMessage; dBOperations.EvntInfoMessage += new SqlAbstractConnector.Message <TextEventArgs>(DBOperations_EvntInfoMessage); MakeTextBoxResultShow(); sampleStore.Reset(); await DeleteColumnsInDB(currentSQLConnectionStore.GetCurrent()); ShowMessage("Готово!"); listBoxSample.Show(); dBOperations.EvntInfoMessage -= DBOperations_EvntInfoMessage; HideTextBoxResultShow(); EnabledInterface(true); }
private void ComboBoxTable_SelectedIndexChanged(object sender, EventArgs e) { ISQLConnectionSettings newSettings = currentSQLConnectionStore?.GetCurrent(); newSettings.Table = comboBoxTable?.SelectedItem?.ToString()?.Split('(')[0]?.Trim(); lstColumn.Clear(); foreach (var col in SQLSelector.GetColumns(newSettings).ToModelList()) { string name = col.Name.Equals(col.Alias) ? col.Name : $"{col.Name} ({col.Alias})"; lstColumn.Add(name); } columnDeleteStore.Reset(); currentSQLConnectionStore.Set(newSettings); }