private void btnTUpdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTUpdateActionPerformed
        // TODO add your handling code here:
        int tid = Integer.parseInt(lblTestID.getText());
        if (tid<=0)
            return;
        if(tbxNDoctorID.getText().equals(""))
        {
            tbxError.setText("Permission denied.");
            return ;
        }
        String tt = tbxTestType.getText().trim().replace("'", "");
        if (tt.equals(""))
        {
            tbxError.setText("Empty test type.");
            return ;
        }
        String td = tbxTestDes.getText().trim().replace("'", "");
        if (td.equals(""))
        {
            td = "(empty)";
            tbxTestDes.setText(td);
        }
        Test_Controller TC = new Test_Controller("localhost", DBName, DBAccount, DBPwd);
        boolean flag = TC.UpdateTest(tid, tt, td, ThisUser.UserID);
        if(!flag)
        {
            tbxError.setText(TC.err);
            return;
        }
        //String key = tbxTSearch.getText().trim().replace("'", "");
        //int Method  = cbxTSearchType.getSelectedIndex();
        String key = String.valueOf(tid);
        int Method = 0;
        SearchTests(Method, key);
        tbxError.setText("Updated Test #" + tid +" successfully.");
        int t = tblTests.getSelectedRow();
        try
        {
            ShowTInfo((Test)ReturnedTests.get(t));
        }
        catch(Exception e){}
    }