private void txt_Brand_TextChanged(object sender, TextChangedEventArgs e) { connect = new CTUConnection();// refreshens the 'CTUConnection' class // if (Department == 1) { connect.SelectTestDrive(); //*Selects the specified columns in the Patient table*// connect.SearchBrandBook(txt_Brand.Text); //Searches the customer's 'name' within the populated table// DGV_TestDrive.ItemsSource = connect.dataset; //*All the selected fields are filtered inside the table and stored inside the grid-view*// } else if (Department == 2) { connect.SelectTestDrive2(); //*Selects the specified columns in the Patient table*// connect.SearchBrandBook(txt_Brand.Text); //Searches the customer's 'name' within the populated table// DGV_TestDrive.ItemsSource = connect.dataset; //*All the selected fields are filtered inside the table and stored inside the grid-view*// } }