public static SqlConnection ShowConnectDialog() { var dlg = new ConnectDialog(); var result = dlg.ShowDialog(); return(result.HasValue & result.Value ? dlg.Connection : null); }
private void MenuItem_Click(object sender, RoutedEventArgs e) { sqlConnection = ConnectDialog.ShowConnectDialog(); }