Beispiel #1
0
        //Insert
        private void Btninsert_Click_1(object sender, EventArgs e)
        {
            string insertQuery = "INSERT INTO patient(p_name) " +
                                 "VALUES('" + txtpname.Text + "')";

            if (qs.executeQuery(insertQuery) == "T")
            {
                MessageBox.Show("Successfully Inserted!");
                clearAll();
            }
            else
            {
                MessageBox.Show("Failed to Insert!");
                MessageBox.Show(qs.executeQuery(insertQuery));
            }
        }
 private void Btninsert_Click(object sender, EventArgs e)
 {
     if (cmbpatient.Text != "None" && cmbdoc.Text != "None")
     {
         string insertQuery = "INSERT INTO doctorpatient(e_id,p_id,treat) " +
                              "VALUES('" + cmbdoc.Text + "', '" + cmbpatient.Text + "', '" + txttreat.Text + "')";
         if (qs.executeQuery(insertQuery) == "T")
         {
             MessageBox.Show("Successfully Inserted!");
             clearAll();
         }
         else
         {
             MessageBox.Show("Failed to Insert!");
             MessageBox.Show(qs.executeQuery(insertQuery));
         }
     }
     else
     {
         MessageBox.Show("Please Select a Patient Number and Doctor Number");
     }
 }
Beispiel #3
0
 //Insert
 private void Btninsert_Click(object sender, EventArgs e)
 {
     if (cmbemptype.Text != "None")
     {
         string insertQuery = "INSERT INTO employee(e_name,salary,etype,dep_no,major) " +
                              "VALUES('" + txtempname.Text + "','" + txtempsal.Text + "', '" + cmbemptype.SelectedItem + "', '" + txtdepno.Text + "', '" + txtmajor.Text + "')";
         if (qs.executeQuery(insertQuery) == "T")
         {
             MessageBox.Show("Successfully Inserted!");
             clearAll();
         }
         else
         {
             MessageBox.Show("Failed to Insert!");
             MessageBox.Show(qs.executeQuery(insertQuery));
         }
     }
     else
     {
         MessageBox.Show("Please select an Employee Type!");
     }
 }
Beispiel #4
0
 private void Btninsert_Click(object sender, EventArgs e)
 {
     if (cmbetype.Text != "None")
     {
         string insertQuery = "INSERT INTO useracc(e_id,pass,ustype) " +
                              "VALUES('" + txteid.Text + "','" + txtpass.Text + "','" + cmbetype.SelectedItem + "')";
         if (qs.executeQuery(insertQuery) == "T")
         {
             MessageBox.Show("Successfully Inserted!");
             clearAll();
         }
         else
         {
             MessageBox.Show("Failed to Insert!");
             MessageBox.Show(qs.executeQuery(insertQuery));
         }
     }
     else
     {
         MessageBox.Show("Please Set a User Type!");
     }
 }
 //Insert
 private void Btninsert_Click(object sender, EventArgs e)
 {
     if (cmbrtype.Text != "None")
     {
         string insertQuery = "INSERT INTO room(rtype) " +
                              "VALUES('" + cmbrtype.SelectedItem + "')";
         if (qs.executeQuery(insertQuery) == "T")
         {
             MessageBox.Show("Successfully Inserted!");
             clearAll();
         }
         else
         {
             MessageBox.Show("Failed to Insert!");
             MessageBox.Show(qs.executeQuery(insertQuery));
         }
     }
     else
     {
         MessageBox.Show("Please Select a Room Type");
     }
 }
Beispiel #6
0
 //Insert
 private void Btninsert_Click(object sender, EventArgs e)
 {
     if (cmbroom.Text != "None" && cmbpatient.Text != "None" && cmbdoc.Text != "None")
     {
         string insertQuery = "INSERT INTO appointment(a_date,r_no,p_id,e_id) " +
                              "VALUES('" + txtdate.Text + "','" + cmbroom.SelectedItem + "', '" + cmbpatient.SelectedItem + "', '" + cmbdoc.SelectedItem + "')";
         if (qs.executeQuery(insertQuery) == "T")
         {
             MessageBox.Show("Successfully Inserted!");
             clearAll();
         }
         else
         {
             MessageBox.Show("Failed to Insert!");
             MessageBox.Show(qs.executeQuery(insertQuery));
         }
     }
     else
     {
         MessageBox.Show("Please Set a Room Number, Patient ID and Doctor ID!");
     }
 }
Beispiel #7
0
 //Insert
 private void Btninsert_Click(object sender, EventArgs e)
 {
     if (cmbpatient.Text != "None")
     {
         string insertQuery = "INSERT INTO payment(amount,p_id) " +
                              "VALUES('" + txtamt.Text + "','" + cmbpatient.SelectedItem + "')";
         if (qs.executeQuery(insertQuery) == "T")
         {
             MessageBox.Show("Successfully Inserted!");
             clearAll();
         }
         else
         {
             MessageBox.Show("Failed to Insert!");
             MessageBox.Show(qs.executeQuery(insertQuery));
         }
     }
     else
     {
         MessageBox.Show("Please Set a Patient ID!");
     }
 }
Beispiel #8
0
 //Insert Doctorrrom
 private void Btninsert_Click(object sender, EventArgs e)
 {
     if (cmbrn.Text != "None")
     {
         string insertQuery1 = "INSERT INTO doctorroom(e_id,room_no) " +
         "VALUES('" + txtdo.Text + "', '" + cmbrn.SelectedItem + "')";
         if (qs.executeQuery(insertQuery1) == "T")
         {
             MessageBox.Show("Successfully Inserted!");
             clearAll();
         }
         else
         {
             MessageBox.Show("Failed to Insert!");
             MessageBox.Show(qs.executeQuery(insertQuery1));
         }
     }
     else
     {
         MessageBox.Show("Please Select a Room Number");
     }
 }