|
|
|
|
@ -490,15 +490,16 @@ public class FichaWindow extends TabbedWindow
|
|
|
|
|
}
|
|
|
|
|
byte fo[] = (byte []) exame.get( ExameData.FO );
|
|
|
|
|
byte pdf[] = (byte []) exame.get( ExameData.PDF );
|
|
|
|
|
TrabalhadorData trabalhadorExame = ( TrabalhadorData ) exame.get( ExameData.TRABALHADOR );
|
|
|
|
|
String nomeFicheiro = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadorData.NOME ) );
|
|
|
|
|
nomeFicheiro.replaceAll( " ", "_" );
|
|
|
|
|
|
|
|
|
|
if( fo != null )
|
|
|
|
|
{
|
|
|
|
|
FichaAptidaoCreator.getCreator().print( fo );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TrabalhadorData trabalhadorExame = ( TrabalhadorData ) exame.get( ExameData.TRABALHADOR );
|
|
|
|
|
String nomeFicheiro = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadorData.NOME ) );
|
|
|
|
|
nomeFicheiro = nomeFicheiro.replaceAll( " ", "_" );
|
|
|
|
|
ePDF.print( pdf, nomeFicheiro );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -734,10 +735,8 @@ public class FichaWindow extends TabbedWindow
|
|
|
|
|
|
|
|
|
|
private void printOld()
|
|
|
|
|
{
|
|
|
|
|
if( trabalhadorID == null )
|
|
|
|
|
if( trabalhadorID != null )
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Vector linhas;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
@ -754,13 +753,12 @@ public class FichaWindow extends TabbedWindow
|
|
|
|
|
dialog.setSize( 250, 200 );
|
|
|
|
|
dialog.setVisible( true );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean executeListAction( int line, Object value )
|
|
|
|
|
{
|
|
|
|
|
if( value == null )
|
|
|
|
|
if( value != null )
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
print( ( ( IDObject )value ).getID() );
|
|
|
|
|
@ -770,6 +768,7 @@ public class FichaWindow extends TabbedWindow
|
|
|
|
|
DialogException.showExceptionMessage( ex, "Erro a imprimir Ficha", true );
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|