private void button_submit_Click(object sender, EventArgs e) { ArrayList patientInfo = new ArrayList(); patientInfo.Add(textBox_billid.Text); patientInfo.Add(textBox_pid.Text); patientInfo.Add(textBox_datein.Text); patientInfo.Add(textBox_dateout.Text); patientInfo.Add(textBox_days.Text); patientInfo.Add(textBox_roomtype.Text); patientInfo.Add(textBox_unit.Text); patientInfo.Add(textBox_service.Text); patientInfo.Add(textBox_medCharge.Text); patientInfo.Add(textBox_docCharge.Text); patientInfo.Add(textBox_price.Text); patientInfo.Add("Checked Out"); String bill = textBox_billid.Text; String pid = textBox_pid.Text; DatabaseHelperClass ob = new DatabaseHelperClass(patientInfo); if (ob.checkBill(bill, pid)) { if (ob.Checkout()) { MessageBox.Show("Checked Out"); } else { MessageBox.Show("Error Checking Out"); } } else { MessageBox.Show("Bill Or Patient ID Already Exist"); } }