Esempio n. 1
0
        public void addPatient()
        {
            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.addPatient(textBox1.Text.Trim(), textBox2.Text.Trim(), dob, gender, textBox3.Text.Trim(), cat);
            MessageBox.Show(opd.message);
            if (opd.message == "Details added Sucessfully!")
            {
                clearData();
            }
        }