Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Load_BTN_Click(object sender, EventArgs e)
- {
- try
- {
- string selectQuery = "Select * from Fuel_Attendend";
- cmd = new SqlCommand(selectQuery, connection);
- try
- {
- connection.Open();
- dr = cmd.ExecuteReader();
- while (dr.Read())
- {
- this.chart1.Series["Date"].Points.AddXY(dr.GetString(3), dr.GetInt32(6));
- }
- }
- catch(Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- connection.Close();
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
Add Comment
Please, Sign In to add comment