private void buttonSave_Click(object sender, EventArgs e)
        {
            //save
            string query = "insert into booking ([doctor_name],[patient_name],[date_booking],[time_booking],[required_pay]) values('" + comboBoxD_name.Text + "','" + comboBoxP_name.Text + "','" + dateTimePickerDate.Text + "','" + maskedTextBoxTime.Text + "','" + comboBoxPay.Text + "')";

            db.Insert_Update_deleteDB(query);
            MessageBox.Show("Your Data Saved ");
        }
        private void buttonSave_Click(object sender, EventArgs e)
        {
            //save
            string query = "insert into dept ([dept_name]) values('" + textBoxname.Text + "')";

            db.Insert_Update_deleteDB(query);
            MessageBox.Show("Your Data Saved ");
        }
        private void buttonSave_Click(object sender, EventArgs e)
        {
            //save
            string query = "insert into file ([doctor_name],[patient_name],[diagnosis],[examination],[medicin]) values('" + comboBoxD_name.Text + "','" + comboBoxP_name.Text + "','" + textBoxdiag.Text + "','" + textBoxexam.Text + "','" + textBoxmedicin.Text + "')";

            db.Insert_Update_deleteDB(query);
            MessageBox.Show("Your Data Saved ");
        }
        private void buttonSave_Click(object sender, EventArgs e)
        {
            //save
            string query = "insert into doctor ([doctor_name],[dept_id],[major],[identity_no],[phone_no],[email],[street],[day_work],[time_work]) values('" + textBoxd_name.Text + "','" + comboBoxdp_id.Text + "','" + textBoxmajor.Text + "','" + maskedTextBoxidt_no.Text + "','" + maskedTextBoxphone.Text + "','" + textBoxemail.Text + "','" + textBoxstreet.Text + "','" + checkedListBoxday.Text + "' ,'" + maskedTextBoxtime.Text + "')";

            db.Insert_Update_deleteDB(query);
            MessageBox.Show("Your Data Saved ");
        }
示例#5
0
        private void buttonUpdate_Click(object sender, EventArgs e)
        {
            //update


            if (radioButton1.Checked == true)
            {
                label3.Text = "Male";
            }
            if (radioButton2.Checked == true)
            {
                label3.Text = "Female";
            }
            string query = "update patient set patient_name='" + textBox2.Text + "', set sex='" + label3.Text + "' , set age='" + maskedTextBox1.Text + "' ,set identity_no='" + maskedTextBox3.Text + "' , set phone_no='" + maskedTextBox2.Text + "', set email='" + textBox3.Text + "', set street='" + textBox4.Text + "' where patient_id=" + Convert.ToInt16(textBox1.Text);

            db.Insert_Update_deleteDB(query);
            MessageBox.Show("Your Data Updated ");
        }