Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Szukaj_Click(object sender, RoutedEventArgs e)
- {
- DbClass.openConnection();
- DbClass.sql = "SELECT * FROM ksiazki WHERE tytul LIKE '%"+nazwa.Text+"%';";
- DbClass.cmd.CommandType = CommandType.Text;
- DbClass.cmd.CommandText = DbClass.sql;
- DbClass.da = new SqlDataAdapter(DbClass.cmd);
- DbClass.dt = new DataTable();
- DbClass.da.Fill(DbClass.dt);
- myDataGrid.ItemsSource = DbClass.dt.DefaultView;
- DbClass.closeConnection();
- }
- private void Nazwa_DragEnter(object sender, DragEventArgs e)
- {
- }
- private void Dodaj_Click(object sender, RoutedEventArgs e)
- {
- Dodawanie Dod = new Dodawanie();
- Dod.Show();
- }
- private void Refresh_Click(object sender, RoutedEventArgs e)
- {
- DbClass.openConnection();
- DbClass.sql = "SELECT * FROM ksiazki;";
- DbClass.cmd.CommandType = CommandType.Text;
- DbClass.cmd.CommandText = DbClass.sql;
- DbClass.da = new SqlDataAdapter(DbClass.cmd);
- DbClass.dt = new DataTable();
- DbClass.da.Fill(DbClass.dt);
- myDataGrid.ItemsSource = DbClass.dt.DefaultView;
- DbClass.closeConnection();
- }
- private void Usun_Click(object sender, RoutedEventArgs e)
- {
- Usuwanie Us = new Usuwanie();
- Us.Show();
- }
- private void Edit_Click(object sender, RoutedEventArgs e)
- {
- Edytowanie Ed = new Edytowanie();
- Ed.Show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement