|
|
|
|
@ -261,6 +261,17 @@ public class FichaWindow extends TabbedWindow
|
|
|
|
|
// estabelecimento.save();
|
|
|
|
|
|
|
|
|
|
exame.save();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if( medico != null )
|
|
|
|
|
{
|
|
|
|
|
fdpProvider.setMedicoForEstabelecimento( ( Integer ) estabelecimento.get( EstabelecimentoData.ID ),
|
|
|
|
|
( Integer ) medico.get( MedicoData.ID ) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch( Exception mex )
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
// fdpProvider.savePDF( exame );
|
|
|
|
|
|
|
|
|
|
// DBKey key = trabalhador.getPrimaryKeyValue();
|
|
|
|
|
@ -292,23 +303,7 @@ public class FichaWindow extends TabbedWindow
|
|
|
|
|
fdpProvider.setSearch( FichaDataProvider.SEARCH_EMPRESAS );
|
|
|
|
|
SearchDialog search;
|
|
|
|
|
Integer oldID = empresaID;
|
|
|
|
|
// if( empresaID != null )
|
|
|
|
|
// {
|
|
|
|
|
// try
|
|
|
|
|
// {
|
|
|
|
|
// MetaObject empresa = fdpProvider.load( fdpProvider.EMPRESAS, new DBKey( empresaID ) );
|
|
|
|
|
// String designacao = (String) empresa.getProperty( fdpProvider.DESIGNACAO_SOCIAL );
|
|
|
|
|
// search = new SearchDialog( fdpProvider, null, true, new Object[]{ empresaID, designacao }, false );
|
|
|
|
|
// }
|
|
|
|
|
// catch( Exception ex )
|
|
|
|
|
// {
|
|
|
|
|
// search = new SearchDialog( fdpProvider, null, true, null, true );
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// search = new SearchDialog( fdpProvider, null, true, null, true );
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
search = new SearchDialog( fdpProvider, null, false, null, true );
|
|
|
|
|
empresaID = ( Integer )search.getSelected();
|
|
|
|
|
|
|
|
|
|
@ -329,23 +324,7 @@ public class FichaWindow extends TabbedWindow
|
|
|
|
|
|
|
|
|
|
fdpProvider.setSearch( FichaDataProvider.SEARCH_ESTABELECIMENTOS );
|
|
|
|
|
fdpProvider.setSearchID( FichaDataProvider.SEARCH_EMPRESAS, empresaID.intValue() );
|
|
|
|
|
// if( oldID != null && oldID.equals( empresaID ) && estabelecimentoID != null )
|
|
|
|
|
// {
|
|
|
|
|
// try
|
|
|
|
|
// {
|
|
|
|
|
// MetaObject estabelecimento = fdpProvider.load( fdpProvider.ESTABELECIMENTOS, new DBKey( estabelecimentoID ) );
|
|
|
|
|
// String nome = (String) estabelecimento.getProperty( fdpProvider.NOME );
|
|
|
|
|
// search = new SearchDialog( fdpProvider, null, true, new Object[]{ estabelecimentoID, nome }, false );
|
|
|
|
|
// }
|
|
|
|
|
// catch( Exception ex )
|
|
|
|
|
// {
|
|
|
|
|
// search = new SearchDialog( fdpProvider, null, true, null, true );
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// search = new SearchDialog( fdpProvider, null, true, null, true );
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
search = new SearchDialog( fdpProvider, null, false, null, true );
|
|
|
|
|
estabelecimentoID = ( Integer )search.getSelected();
|
|
|
|
|
|
|
|
|
|
@ -433,7 +412,7 @@ public class FichaWindow extends TabbedWindow
|
|
|
|
|
}
|
|
|
|
|
} );
|
|
|
|
|
dialog.setSize( 250, 200 );
|
|
|
|
|
dialog.show();
|
|
|
|
|
dialog.setVisible( true );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void reload( int index )
|
|
|
|
|
|