Package org.ldv.sio.getap.app

Examples of org.ldv.sio.getap.app.AccPersonalise


      User user = UtilSession.getUserInSession();
      DemandeValidationConsoTempsAccPers dctapForUpdate = manager
          .getDVCTAPById(Long.valueOf(formDctap.getId()));
      if (dctapForUpdate.getEtat() == 0 || dctapForUpdate.getEtat() == 4) {

        AccPersonalise acc = new AccPersonalise(null,
            formDctap.getAccPersNom(), 1, user.getId());
        if (manager.getAPById(formDctap.getAccPersId()) != null) {
          acc = manager.getAPById(formDctap.getAccPersId());
          dctapForUpdate
              .setAccPers(manager.getAPById(formDctap.getAccPersId()));
View Full Code Here


    }

    if (bindResult.hasErrors()) {
      return "eleve/ajoutdctap";
    } else {
      AccPersonalise acc = new AccPersonalise(null, formAjout.getAccPersNom(),
          1, formAjout.getEleveId());
      if (manager.getAPById(formAjout.getAccPersId()) != null) {
        acc = manager.getAPById(formAjout.getAccPersId());
      } else {
        manager.addAP(acc);
View Full Code Here

      return dctap;
    }
  }

  public AccPersonalise getAPByNom(String nom) {
    AccPersonalise acc;
    try {
      acc = this.jdbcTemplate.queryForObject(
          "select * from ap where libelle = ?", new Object[] { nom },
          new AccMapper());
    } catch (EmptyResultDataAccessException e) {
View Full Code Here

      UserDAOJdbc userDao = new UserDAOJdbc();
      AccPersonnaliseDAOJdbc accPersonnalise = new AccPersonnaliseDAOJdbc();
      User prof = userDao.getUserById(idProf);
      User eleve = userDao.getUserById(idEleve);
      AccPersonalise ap = accPersonnalise.getAPById(idAP);

      dctap.setProf(prof);
      dctap.setEleve(eleve);
      dctap.setAccPers(ap);
View Full Code Here

  }

  private static final class AccMapper implements RowMapper<AccPersonalise> {
    public AccPersonalise mapRow(ResultSet rs, int rowNum)
        throws SQLException {
      AccPersonalise acc = new AccPersonalise();
      acc.setId(rs.getInt("id"));
      acc.setNom(rs.getString("libelle"));
      acc.setOrigineEtat(rs.getInt("origineEtat"));
      acc.setIdUser(rs.getLong("idUser"));
      try {
        acc.setCount(rs.getInt("apByType"));
        acc.setIdEleve(rs.getInt("idEleve"));
      } catch (SQLException ex) {

      }
      return acc;
    }
View Full Code Here

  }

  @RequestMapping(value = "doajoutAP", method = RequestMethod.POST)
  public String doajoutAP(FormAjoutAp formAjout, BindingResult bindResult,
      Model model) {
    AccPersonalise acc = new AccPersonalise();
    acc.setNom(formAjout.getNom());
    acc.setOrigineEtat(0);
    acc.setIdUser(null);

    manager.addAP(acc);

    return "redirect:/app/admin/logiciel";
  }
View Full Code Here

  }

  @RequestMapping(value = "editAp", method = RequestMethod.GET)
  public String editAp(@RequestParam("id") String id, FormAjoutAp formAjout,
      Model model) {
    AccPersonalise acc = manager.getAPById(Integer.valueOf(id));
    formAjout.setNom(acc.getNom());
    return "admin/editAp";
  }
View Full Code Here

    if (bindResult.hasErrors()) {
      return "redirect:/app/admin/logiciel";
    } else {

      AccPersonalise acc = manager.getAPById(Integer.valueOf(formEdit
          .getId()));
      acc.setNom(formEdit.getNom());
      manager.upDateAP(acc);

      return "redirect:/app/admin/logiciel";
    }
  }
View Full Code Here

    }
  }

  @RequestMapping(value = "deleteAP/{id}", method = RequestMethod.GET)
  public String deleteAPById(@PathVariable String id, Model model) {
    AccPersonalise acc = manager.getAPById(Integer.valueOf(id));

    if (!acc.getId().equals(null)) {
      manager.deleteAP(acc);
    }
    return "redirect:/app/admin/logiciel";

  }
View Full Code Here

    else {

      DemandeValidationConsoTempsAccPers dctapForUpdate = manager
          .getDVCTAPById(Long.valueOf(formDctap.getId()));

      AccPersonalise acc = manager.getAPById(formDctap.getAccPersId());
      String accPersNom = acc.getNom();

      if (!dctapForUpdate.getDateAction().equals(
          formDctap.getDateAction())
          && !dctapForUpdate.isDateModifiee()) {
        dctapForUpdate.setDctapDateModif();
View Full Code Here

TOP

Related Classes of org.ldv.sio.getap.app.AccPersonalise

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.