private void btnSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchActionPerformed
        String searchString = txtFieldSearch.getText();
        ArrayList<Staff> foundStaff = new ArrayList<Staff>();


        if (searchString.isEmpty()) {
            foundStaff = Controller.Instance().getStaff();
        } else {
            int searchId = -1;
            try {
                searchId = Integer.parseInt(searchString);
            } catch (NumberFormatException nfe) {
                Logger.getLogger(GenericTableModel.class.getName()).log(Level.FINER, null, nfe.getMessage());
            }

            if (searchId != -1) {
                foundStaff.addAll(Controller.Instance().SearchStaff(searchId));
            }
            Staff.PersonalType st = null;
            try {
                st = (Staff.PersonalType.valueOf(searchString));
            } catch (IllegalArgumentException iae) {
                Logger.getLogger(GenericTableModel.class.getName()).log(Level.FINER, null, iae.getMessage());
            }
            if(st!= null){
                foundStaff.addAll(Controller.Instance().SearchStaff(st));
            }
            foundStaff.addAll(Controller.Instance().SearchStaff(searchString));
        }
        tblPersonal.setModel(new GenericTableModel<Staff>(foundStaff));

    }//GEN-LAST:event_btnSearchActionPerformed