private void comboProviders_SelectionChanged(object sender, SelectionChangedEventArgs e) { strProvider = comboProviders.SelectedValue.ToString(); btnTest.Background = new SolidColorBrush(Colors.LightGray); blnIsConnectionTrue = false; txtStatus.Text = ""; if (strProvider.IndexOf("OleDb") >= 0) { DataOut newDataOut = new DataOut(); newDataOut.dsResult = null; newDataOut.Show(); // Need to subscribe ... newDataOut.runDBSql(); listOpenDataOut.Add(newDataOut); } }
private void btnRun_Click(object sender, RoutedEventArgs e) { if (blnIsConnectionTrue) { DataOut newDataOut = new DataOut(); newDataOut.dsResult = null; newDataOut.Show(); listOpenDataOut.Add(newDataOut); // Need to subscribe ... newDataOut.runSQL(strProvider, txtConnectionString.Text, new StringBuilder(txtSQL.Text)); txtStatus.Text = "RUN"; txtStatus.Foreground = new SolidColorBrush(Colors.Green); } else { txtStatus.Text = "Please TEST Connection FIRST..."; txtStatus.Foreground = new SolidColorBrush(Colors.Red); } }