private void button_add_Click(object sender, EventArgs e) { ArrayList roomInfo = new ArrayList(); roomInfo.Add(textBox_roomno.Text); roomInfo.Add(comboBox_roomtype.Text); roomInfo.Add(textBox_numbed.Text); roomInfo.Add(textBox_unitprice.Text); roomInfo.Add(comboBox_building.Text); roomInfo.Add(comboBox_floor.Text); DatabaseHelperClass ob = new DatabaseHelperClass(roomInfo); if (ob.insertRoomInfo()) { MessageBox.Show("Room Added"); } else { MessageBox.Show("Error Adding Room"); } }