// }
}//GEN-LAST:event_btSocialCardLinkActionPerformed
private void btRepresentativeSelectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btRepresentativeSelectActionPerformed
try {
EmptyDialog dialog = new EmptyDialog(MainWindow.mainWindow, "Выбор представителя пациента", getAuditManager());
PanelUserSearch panel = new PanelUserSearch(dialog, PanelUserSearch.MODE_SELECT);
dialog.addNewPage((PageGeneric) panel, null);
dialog.setVisible(true);
ClientLocal representative = panel.getSelectedClient();
if (dialog.getDlgResult() == ModalDialog.DLG_OK) {
clientLocal.setRepresentative(representative);
if (representative != null) {
editRepresentative.setText(representative.getSurname() + " " +
representative.getName() +
" " + representative.getPathron());