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 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,41 +735,39 @@ public class FichaWindow extends TabbedWindow
private void printOld()
{
if( trabalhadorID == null )
{
return;
}
Vector linhas;
try
if( trabalhadorID != null )
{
IDObject fichas[] = fdpProvider.getAllFichasForTrabalhador( trabalhadorID );
linhas = new Vector( Arrays.asList( fichas ) );
}
catch( Exception ex )
{
DialogException.showExceptionMessage( ex, "Erro a criar lista de Fichas anteriores", true );
return;
Vector linhas;
try
{
IDObject fichas[] = fdpProvider.getAllFichasForTrabalhador( trabalhadorID );
linhas = new Vector( Arrays.asList( fichas ) );
}
catch( Exception ex )
{
DialogException.showExceptionMessage( ex, "Erro a criar lista de Fichas anteriores", true );
return;
}
ListActionDialog dialog = new ListActionDialog( this, "Imprimir Fichas Anteriores", new String[]{ "Data" },
linhas, this );
dialog.setSize( 250, 200 );
dialog.setVisible( true );
}
ListActionDialog dialog = new ListActionDialog( this, "Imprimir Fichas Anteriores", new String[]{ "Data" },
linhas, this );
dialog.setSize( 250, 200 );
dialog.setVisible( true );
}
public boolean executeListAction( int line, Object value )
{
if( value == null )
{
return true;
}
try
{
print( ( ( IDObject )value ).getID() );
}
catch( Exception ex )
if( value != null )
{
DialogException.showExceptionMessage( ex, "Erro a imprimir Ficha", true );
return false;
try
{
print( ( ( IDObject )value ).getID() );
}
catch( Exception ex )
{
DialogException.showExceptionMessage( ex, "Erro a imprimir Ficha", true );
return false;
}
}
return true;
}

Loading…
Cancel
Save