ch.setBanco(banco);
ch.setAgencia(agencia);
ch.setNumConta(numeroDaConta);
try {
DaoCheques dc = new DaoCheques();
dc.cadastrarCheque(ch);
session.setAttribute("TABELA", "cadastrarCheque");
rd = request.getRequestDispatcher("/financeiro/jsp/responsavel.jsp");
rd.forward(request, response);
}
catch (SQLException e) {
e.printStackTrace();
}
}
else if(comm.equals("paglistarChequeCliente")){
rd = request.getRequestDispatcher("/financeiro/jsp/listarCheques.jsp");
rd.forward(request, response);
}
else if(comm.equals("listarChequeCliente")){
try {
DaoCheques dc = new DaoCheques();
ArrayList<Cheques> lista = dc.listarCheques(request.getParameter("cpf"));
session.setAttribute("listar", lista);
rd = request.getRequestDispatcher("/financeiro/jsp/listarCheques.jsp");
rd.forward(request, response);
} catch (SQLException e) {
e.printStackTrace();
}
}
else if(comm.equals("pagexcluirCheque")){
rd = request.getRequestDispatcher("/financeiro/jsp/excluirCheque.jsp");
rd.forward(request, response);
}
else if(comm.equals("excluirCheque")){
try{
DaoCheques dc = new DaoCheques();
dc.excluirCheques(Integer.parseInt(request.getParameter("codCheque")));
session.setAttribute("TABELA", "excluirCheque");
rd = request.getRequestDispatcher("/financeiro/jsp/responsavel.jsp");
rd.forward(request, response);
}