public UpdateComfortZoneValue ( string id, string name, double min_temp, double max_temp, double min_hum, double max_hum, Color color ) : void | ||
id | string | |
name | string | |
min_temp | double | |
max_temp | double | |
min_hum | double | |
max_hum | double | |
color | Color | |
return | void |
private void btn_update_Click(object sender, EventArgs e) { //now we can update at this point the previous values. if (tb_name.Text != "") { if (tb_mintemp.Text != "" && tb_maxtemp.Text != "" && tb_minhum.Text != "" && tb_maxhum.Text != "") { //we need to grab the value and insert it double minT = double.Parse(tb_mintemp.Text); double maxT = double.Parse(tb_maxtemp.Text); double minH = double.Parse(tb_minhum.Text); double maxH = double.Parse(tb_maxhum.Text); string name = tb_name.Text; Color c = btn_color.BackColor; string id = bs.listComfortZoneDetail[comboBox2.SelectedIndex].id; // bs.InsertComfortZoneValue(name, minT, maxT, minH, maxH, c); bs.UpdateComfortZoneValue(id, name, minT, maxT, minH, maxH, c); MessageBox.Show("Value updated succefully"); //NOW LEST REFRESH THE FORM refreshAfterEdit(); } else { MessageBox.Show("Please fill the temperature and humidity accurately"); } } else { MessageBox.Show("Enter the name of the comfortzone"); } }