Package dao

Examples of dao.DetailEpreuveDAO


        try {

            int IdEp = Integer.parseInt(request.getParameter("idEpreuve"));
            Context init = new InitialContext();
            DataSource dataSource = (DataSource) init.lookup("java:comp/env/jdbc/iphitosbd");
            DetailEpreuveDAO detailEpDao = new DetailEpreuveDAO(dataSource);


            /**
             * boucle qui permet de selectionner la liste des sportifs
             * soit sportifs inscrits dans une epreuve individuelle ou par equipe
             */
            int[] tabIdEp = detailEpDao.getTableauIdEpEq(IdEp);
            boolean trouve = false;
            for (int i = 0; i < tabIdEp.length; i++) {
                trouve = trouve || (IdEp == tabIdEp[i]);
            }
            if (trouve) {
                getServletContext().setAttribute("sportifs", detailEpDao.getSportifsEpreuveEq(IdEp));
                getServletContext().setAttribute("nomCatEpreuve", detailEpDao.getNomCatEpreuveEq(IdEp));
            } else {
                getServletContext().setAttribute("sportifs", detailEpDao.getSportifsEpreuveInd(IdEp));
                getServletContext().setAttribute("nomCatEpreuve", detailEpDao.getNomCatEpreuveInd(IdEp));
            }
            getServletContext().getRequestDispatcher("/WEB-INF/afficherDetailEpreuve.jsp").forward(request, response);
        } catch (Exception ex) {
         
            Logger.getLogger(DetailEpreuve.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here

TOP

Related Classes of dao.DetailEpreuveDAO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.