no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@299 bb69d46d-e84e-40c8-a05a-06db0d633741
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Frederico Palma 19 years ago
parent 4c34f1a67a
commit 4801892107

@ -151,9 +151,39 @@ public class LembretesDataProvider
}
public void getLembretesByTipo( Integer tipoID )
public Lembrete[] getLembretesByTipo( Integer tipoID )
throws Exception
{
Select select =
new Select( new String[]{ "lembretes" },
new String[]{ "id", "tipo_id", "data", "descricao",
"texto", "empresa_id", "estabelecimento_id",
"trabalhador_id", "marcacao_estabelecimento_id",
"marcacao_trabalhador_id", "enviar_email",
"periodicidade_dias", "periodicidade_meses" },
new Field( "tipo_id" ).isEqual( tipoID ).and(
new Field( "data" ).isLessOrEqual( new Date() ) ) );
Virtual2DArray array = EXECUTER.executeQuery( select );
Lembrete lembretes[] = new Lembrete[ array.columnLength() ];
for( int n = 0; n < lembretes.length; n++ )
{
Integer id = ( Integer ) array.get( n, 0 );
Date data = ( Date ) array.get( n, 2 );
String descricao = ( String ) array.get( n, 3 );
String texto = ( String ) array.get( n, 4 );
Integer empresaID = ( Integer ) array.get( n, 5 );
Integer estabelecimentoID = ( Integer ) array.get( n, 6 );
Integer trabalhadorID = ( Integer ) array.get( n, 7 );
Integer marcacaoEstabelecimentoID = ( Integer ) array.get( n, 8 );
Integer marcacaoTrabalhadorID = ( Integer ) array.get( n, 9 );
boolean enviarEmail = "y".equals( array.get( n, 10 ) );
Integer periodicidadeDias = ( Integer ) array.get( n, 11 );
Integer periodicidadeMeses = ( Integer ) array.get( n, 12 );
lembretes[ n ] = new Lembrete( id, tipoID, data, descricao, texto,
empresaID, estabelecimentoID, trabalhadorID,
marcacaoEstabelecimentoID, marcacaoTrabalhadorID,
enviarEmail, periodicidadeDias, periodicidadeMeses );
}
return lembretes;
}
}

Loading…
Cancel
Save