Exemplo n.º 1
0
        public Results()
        {
            InitializeComponent();
            SqlConnection connection = new SqlConnection(Settings.Default.connection_String);

            DataTable AllData = QueryResults.Get(connection, "SELECT * FROM Results");

            ResultsTable.ItemsSource = ParseHeaders(AllData).DefaultView;
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
        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;
        }