Package fr.utbm.in56.annonces.dao

Examples of fr.utbm.in56.annonces.dao.DepartementDao


  public ActionForward execute(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response)
      throws Exception {
   
    //cast to ValidatorForm 
                InscrireForm inscrireForm = (InscrireForm) form;
              
                MembreDao dao = new MembreDao();
                Membre m = new Membre();
               
                if(dao.existMemberIdentifiant(inscrireForm.getIdentifiant()) == null){
                    m.setIdentifiant(inscrireForm.getIdentifiant());
                    m.setMotDePasse(inscrireForm.getPassword());
                    m.setAdresse(inscrireForm.getAdresse());
                    m.setCodePostal(inscrireForm.getCodePostal());
                    m.setVille(inscrireForm.getVille());
                    m.setNom(inscrireForm.getNom());
                    m.setPrenom(inscrireForm.getPrenom());


                    dao.save(m);
                    return mapping.findForward("success");
               
View Full Code Here


    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {

        InscrireForm inscrireForm = (InscrireForm) form;

        MembreDao dao = new MembreDao();
       
        Membre membre = dao.existMemberIdentifiant(inscrireForm.getIdentifiant());

        if (membre != null) {
           
            membre.setMotDePasse(inscrireForm.getPassword());
            membre.setAdresse(inscrireForm.getAdresse());
            membre.setCodePostal(inscrireForm.getCodePostal());
            membre.setVille(inscrireForm.getVille());
            membre.setNom(inscrireForm.getNom());
            membre.setPrenom(inscrireForm.getPrenom());


            dao.update(membre);
            return mapping.findForward("success");
View Full Code Here

  public ActionForward execute(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response)
      throws Exception {
                   
            //cast to ValidatorForm 
            LoginForm loginForm = (LoginForm) form;

            Membre m = new Membre();
            m.setIdentifiant(loginForm.getLogin());
            m.setMotDePasse(loginForm.getPassword());

            MembreDao dao = new MembreDao();
            try{
                Membre membre = dao.isRegister(m);
                if(membre != null){
View Full Code Here

  public ActionForward execute(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response)
      throws Exception {
   
         
        MessageForm messageForm = (MessageForm) form;

        MessageDao mDao = new MessageDao();

        Message m = new Message();
        HttpSession session = request.getSession();
       
        Object oAnnonce = session.getAttribute("annonce");
        if(oAnnonce instanceof Annonce){
           
            Annonce annonce = (Annonce)session.getAttribute("annonce");
            m.setAnnonce(annonce);
            m.setDestinataire(annonce.getPublicateur());
           
        }else{
            Message message = (Message)session.getAttribute("message");
            m.setAnnonce(message.getAnnonce());
            m.setDestinataire(message.getExpediteur());
        }
       
        m.setExpediteur((Membre)session.getAttribute("membre"));
       

        m.setCorps(messageForm.getCorps());
        m.setDateEnvoi(Calendar.getInstance());
        m.setMessageAuto(false);
        m.setOuvert(false);

        mDao.save(m);
View Full Code Here

TOP

Related Classes of fr.utbm.in56.annonces.dao.DepartementDao

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.