no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@390 bb69d46d-e84e-40c8-a05a-06db0d633741
Luis Flores 19 years ago
parent 51762b5d60
commit 5a313f3937

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

Loading…
Cancel
Save