|
|
|
@ -161,6 +161,7 @@ public class ProcessoPanel extends JPanel
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
provider.saveProcesso( processo );
|
|
|
|
provider.saveProcesso( processo );
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch( Exception ex )
|
|
|
|
catch( Exception ex )
|
|
|
|
@ -207,6 +208,28 @@ public class ProcessoPanel extends JPanel
|
|
|
|
|
|
|
|
|
|
|
|
protected void fecharProcesso()
|
|
|
|
protected void fecharProcesso()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
String options[] = new String[]{ "N\u00e3o", "Sim" };
|
|
|
|
|
|
|
|
int option = JOptionPane.showOptionDialog( owner,
|
|
|
|
|
|
|
|
"Tem a certeza que quer fechar o processo sem Ficha de Aptid\u00e3o?",
|
|
|
|
|
|
|
|
"Fechar", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,
|
|
|
|
|
|
|
|
getIcon( FECHAR_ICON_PATH ), options, options[ 0 ] );
|
|
|
|
|
|
|
|
if( option == 1 )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
processo.set( TrabalhadoresProcessoData.ESTADO, PROCESSO_FECHADO_CODE );
|
|
|
|
|
|
|
|
processo.set( TrabalhadoresProcessoData.DATA_FIM, new Date() );
|
|
|
|
|
|
|
|
if( gravarProcesso() )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
enableButtons();
|
|
|
|
|
|
|
|
HashMap<Integer,Integer> ids = new HashMap<Integer,Integer>();
|
|
|
|
|
|
|
|
ids.put( ProcessoEvent.TIPO_PROCESSO, ( Integer ) processo.get( TrabalhadoresProcessoData.ID ) );
|
|
|
|
|
|
|
|
ProcessoEvent event = new ProcessoEvent( this, ProcessoEvent.ACCAO_FECHAR, ids );
|
|
|
|
|
|
|
|
for( int n = 0; n < PROCESSO_LISTENERS.size(); n++ )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PROCESSO_LISTENERS.get( n ).processoStateChanged( event );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
reload();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void clear()
|
|
|
|
public void clear()
|
|
|
|
|