public Results() { InitializeComponent(); SqlConnection connection = new SqlConnection(Settings.Default.connection_String); DataTable AllData = QueryResults.Get(connection, "SELECT * FROM Results"); ResultsTable.ItemsSource = ParseHeaders(AllData).DefaultView; }
private void ChangeView(object sender, RoutedEventArgs e) { string v = "18"; string column = "raceID"; SqlConnection connection = new SqlConnection(Settings.Default.connection_String); DataTable rawResults = QueryResults.Get(connection, "Select * FROM RESULTS WHERE " + column + "=" + v); ResultsTable.ItemsSource = ParseHeaders(rawResults).DefaultView; }
private void ChangeView(object sender, RoutedEventArgs e) { string v = "%australian%"; string column = "name"; SqlConnection connection = new SqlConnection(Settings.Default.connection_String); DataTable rawResults = QueryResults.Get(connection, "Select * FROM RACES WHERE " + column + " LIKE '" + v + "'"); ResultsTable.ItemsSource = ParseHeaders(rawResults).DefaultView; }