示例#1
0
        private void button_save_Click(object sender, EventArgs e)
        {
            ArrayList patientInfo = new ArrayList();

            patientInfo.Add(textBox_appid.Text);
            patientInfo.Add(textBox_name.Text);
            patientInfo.Add(comboBox_gender.Text);
            patientInfo.Add(textBox_age.Text);
            patientInfo.Add(textBox_phone.Text);
            patientInfo.Add(richTextBox_address.Text);
            patientInfo.Add(textBox_disease.Text);
            patientInfo.Add(textBox_doctorid.Text);
            patientInfo.Add(textBox_docname.Text);
            patientInfo.Add(textBox_roomnum.Text);
            patientInfo.Add(dateTimePicker1.Text);

            DatabaseHelperClass ob = new DatabaseHelperClass(patientInfo);

            if (ob.takeAppointment())
            {
                MessageBox.Show("Appointed");
            }
            else
            {
                MessageBox.Show("Error Taking Appointment");
            }
        }