Guest User

Untitled

a guest
May 26th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. void BDados::lerPedidos( list <Funcionario> &f,list <Cargo> &c,list <Funcionario*> &p, Queue<Pedido> q, FilaPrioritaria &fp)
  2. {
  3.  
  4.  
  5. instrucao = ligacao->createStatement("SELECT idpedido,idfuncionario,idcargo,tipo from pedidoevolucao");
  6. ResultSet *rset = instrucao->executeQuery ();
  7.  
  8. while (rset->next ())
  9. {
  10. Cargo * car;
  11. car=procurarCargo(c,rset->getInt(3));
  12. Funcionario * fun;
  13. fun=procurarFuncionario(f,rset->getInt(2));
  14.  
  15.  
  16. Pedido c(rset->getInt(1), *fun,car,rset->getInt(4));
  17. if(rset->getInt(4)==3){
  18. fp.insere(fun);
  19. }
  20.  
  21. if(rset->getInt(4)==0 || rset->getInt(4)==1){
  22. q.insere(c);
  23. }
  24.  
  25. if(rset->getInt(4)==2){
  26. p.insert(p.begin(),fun);
  27. }
  28. }
  29. instrucao->closeResultSet (rset);
  30.  
  31. }
Add Comment
Please, Sign In to add comment