Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)
- {
- SqlConnection con = new SqlConnection(polaczenie_baza);
- dataGridView2.DataSource = null;
- dataGridView2.Update();
- dataGridView2.Refresh();
- SqlCommand command1 = new SqlCommand("select id, data_przychodu, rodzaj, kwota from przychody", con);
- con.Open();
- command1.CommandType = CommandType.Text;
- SqlDataAdapter sqlDataAdap = new SqlDataAdapter(command1);
- DataTable bookings = new DataTable();
- sqlDataAdap.Fill(bookings);
- dataGridView2.DataSource = bookings;
- con.Close();
- }
Add Comment
Please, Sign In to add comment