private void btnOrderTestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOrderTestActionPerformed
        // TODO add your handling code here:
        String tt = tbxNTestType.getText().trim().replace("'", "");
        if (tt.equals(""))
        {
            tbxError.setText("Empty test type.");
            return ;
        }
        int pid = -1;
        try{
            pid = Integer.parseInt(tbxNPatientID.getText().trim().replace("'", ""));
        }
        catch(Exception e) {pid = -1;}
        if (pid<=0)
        {
            tbxError.setText("Please input a positive patient ID number.");
            return;
        }
        String td = tbxTestDes2.getText().trim().replace("'", "");
        if (td.equals(""))
        {
            td = "(empty)";
            tbxTestDes.setText(td);
        }
        Test_Controller TC = new Test_Controller("localhost", DBName, DBAccount, DBPwd);
        int tid = TC.OrderTest(pid, ThisUser.UserID, new Date(), tt, td);
        if(tid<=0)
        {
            tbxError.setText(TC.err);
            return;
        }
        ReturnedTests = TC.SearchTest(tid, "Test");
        ShowTests();
        tbxError.setText("Test #" + tid +" is added successfully.");
        tbxNTestType.setText("");
        tbxNPatientID.setText("");
        tbxTestDes2.setText("");
    }