Package dao

Examples of dao.SportifDAO


        String numLog = "nomLog";

        Sportif sp = new Sportif();
        //SportifDAO conP = new SportifDAO();

        SportifDAO Spdao = new SportifDAO(dataSource);

        try {
            //      SportifDAO sportifDAO = SportifDAO.getInstance(dataSource);
            // IdSP = Integer.parseInt(request.getParameter(arg0));
            sp.setNomSportif(request.getParameter(nomSp));
            sp.setPrenomSportif(request.getParameter(prenomSp));
            //  sp.setDateNaissance(request.getParameter(DateNais));
            sp.setSexeSportif(request.getParameter(sexe));
            //sp.setDateInscription(request.getParameter(DateInsc));
            sp.setNomPays(request.getParameter(nomp));

            sp.setNumLogement(Integer.parseInt(request.getParameter(numLog)));
            sp.setNomBatiment(request.getParameter(nomBat));
            //sp.setNumLogement(1);

            Spdao.enregistrement(sp);


            // Sportif sp = (Sportif) Session.getAttribute("Sportif");
            // SportifDAO Spdao = new SportifDAO(dataSource);
            //sp = dao.enregister(sp);
View Full Code Here


     */
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        try {
            int idSportif = Integer.parseInt(request.getParameter("idsportif"));
            SportifDAO spdao = new SportifDAO(dataSource);
            Sportif s = spdao.loadSportif(idSportif);
            request.setAttribute("sportif", s);
            getServletContext().getRequestDispatcher("/formulaireSupprimerSportif.jsp").forward(request, response);
            return;
        } catch (Exception e) {
            throw new ServletException(e.getMessage(), e);
View Full Code Here

        HttpSession session = request.getSession(true);
        try {

            pays = request.getParameter("pays");

            SportifDAO dao = SportifDAO.getInstance(dataSource);
            List<Sportif> liste = dao.loadListeSportif(pays);

            if (liste == null) {
                throw new IllegalArgumentException("Pas de pays à ce nom");

            } else {
View Full Code Here

        String IDSP = "Identif";
        // int IDSP = 0;
        Sportif sp = new Sportif();
        //SportifDAO conP = new SportifDAO();

        SportifDAO Spdao = new SportifDAO(dataSource);

        try {
            //      SportifDAO sportifDAO = SportifDAO.getInstance(dataSource);

            //    IDSP = getIntParameter(request, "noEtud", "Numéro de sportif incorrect");
            //IDSP = Integer.parseInt(request.getParameter(idsp));

            sp.setNomSportif(request.getParameter(nomSp));
            sp.setPrenomSportif(request.getParameter(prenomSp));
//      sp.setDateNaissance(request.getParameter(DateNais));
            sp.setSexeSportif(request.getParameter(sexe));
//          //sp.setDateInscription(request.getParameter(DateInsc));
            sp.setNomPays(request.getParameter(nomp));
            sp.setNomBatiment(request.getParameter(nomBat));
            sp.setNumLogement(Integer.parseInt(request.getParameter(numLog)));
//      //sp.setNumLogement(1);
           
           
            //transformer les carateres de l'identifiant en int
            int idsp = Integer.parseInt(request.getParameter(IDSP));
            sp.setIdSportif(idsp);

            Spdao.editerSportif(sp);


            // Sportif sp = (Sportif) Session.getAttribute("Sportif");
            // SportifDAO Spdao = new SportifDAO(dataSource);
            //sp = dao.enregister(sp);
View Full Code Here

        String IDSP = "Identif";
        // int IDSP = 0;
        Sportif sp = new Sportif();
        //SportifDAO conP = new SportifDAO();

        SportifDAO Spdao = new SportifDAO(dataSource);

        try {
            //      SportifDAO sportifDAO = SportifDAO.getInstance(dataSource);

            //    IDSP = getIntParameter(request, "noEtud", "Numéro de sportif incorrect");
            //IDSP = Integer.parseInt(request.getParameter(idsp));

            sp.setNomSportif(request.getParameter(nomSp));
            sp.setPrenomSportif(request.getParameter(prenomSp));
//      sp.setDateNaissance(request.getParameter(DateNais));
            sp.setSexeSportif(request.getParameter(sexe));
//          //sp.setDateInscription(request.getParameter(DateInsc));
            sp.setNomPays(request.getParameter(nomp));
            sp.setNomBatiment(request.getParameter(nomBat));
            sp.setNumLogement(Integer.parseInt(request.getParameter(numLog)));
//      //sp.setNumLogement(1);


            //transformer les carateres de l'identifiant en int
            int idsp = Integer.parseInt(request.getParameter(IDSP));
            sp.setIdSportif(idsp);
   Spdao.supprimerSportif(sp);


            // Sportif sp = (Sportif) Session.getAttribute("Sportif");
            // SportifDAO Spdao = new SportifDAO(dataSource);
            //sp = dao.enregister(sp);
View Full Code Here

     */
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        try {
            int idSportif = Integer.parseInt(request.getParameter("idsportif"));
            SportifDAO spdao = new SportifDAO(dataSource);
            Sportif s = spdao.loadSportif(idSportif);//recupere les caracteristiques du sportif
            request.setAttribute("sportif", s);//stock dans la session le sportif

            if ("inscrireSportif".equals(request.getParameter("insSpEpInd")))  {
                getServletContext().getRequestDispatcher(
                        "/InscrirSportifChoixEp").forward(request, response);
View Full Code Here

        HttpSession session = request.getSession(true);
        try {

            pays = request.getParameter("pays");

            SportifDAO dao = SportifDAO.getInstance(dataSource);
            List<Sportif> liste = dao.loadListeSportif(pays);
            if (liste == null) {
                throw new IllegalArgumentException("Pas de pays à ce nom");

            } else {
View Full Code Here

    public void init() throws ServletException {
        try {
            Context init = new InitialContext();
            DataSource dataSource = (DataSource) init.lookup("java:comp/env/jdbc/iphitosbd");
            //liste de pays
            SportifDAO spDAO = new SportifDAO(dataSource);
            List<Sportif> listePays=spDAO.loadlistePays();


            DisciplineDAO dDao = new DisciplineDAO(dataSource);
            List<Discipline> disciplines = dDao.getDisciplines();
           
View Full Code Here

        HttpSession session = request.getSession(true);
        try {

            pays = request.getParameter("pays");//recupere le pays

            SportifDAO dao = SportifDAO.getInstance(dataSource);
            List<Sportif> liste = dao.loadListeSportif(pays);// recupere la liste des sportifs pour un pays donnée
            if (liste == null) {
                throw new IllegalArgumentException("Pas de pays à ce nom");//on ne doit jamais rentre

            } else {
View Full Code Here

TOP

Related Classes of dao.SportifDAO

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.