public InsertComfortZoneValue ( string name, double min_temp, double max_temp, double min_hum, double max_hum, Color color ) : void | ||
name | string | name of the comfort zone |
min_temp | double | min temperature |
max_temp | double | max temperature |
min_hum | double | min humidity |
max_hum | double | max humidity |
color | Color | color value |
return | void |
private void btn_add_Click(object sender, EventArgs e) { //We can add new value in thsi function //now lets do the somethings. 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; bs.InsertComfortZoneValue(name, minT, maxT, minH, maxH, c); MessageBox.Show("Add success"); //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"); } //Inserted message //MessageBox.Show("insert end"); }