コード例 #1
0
        public void updatePatient()
        {
            string gender = comboBox2.SelectedItem.ToString();
            string cat    = comboBox1.SelectedItem.ToString();
            string date   = textBox4.Text;
            string month  = textBox5.Text;

            if (textBox4.Text.Length == 1)
            {
                date = "0" + date;
            }
            if (textBox5.Text.Length == 1)
            {
                month = "0" + month;
            }
            string dob = textBox6.Text + "-" + month + "-" + date;
            opd    opd = new opd();

            opd.updatePatient(textBox1.Text, textBox2.Text, dob, gender, textBox3.Text, cat);
            MessageBox.Show(opd.message);
            if (opd.message == "Details UPDATED Sucessfully!!")
            {
                loadData();
                clearData();
            }
        }