Package modele

Examples of modele.Ressource


    head = "<form id='ressourceList'><table><caption class='titre'>Resssources disponibles</caption><thead><TR align='center'>"
        + "<TH>Description</TH><TH>Page</TH><TH>Action</TH></TR></thead><tbody>";

    ArrayList<Ressource> ressources = Dao.allRessources();
    Ressource rs = null;
    if (ressources.size() > 0) {
      for (int i = 0; i < ressources.size(); i++) {
        rs = ressources.get(i);
        body = body
            + "<tr><td>"
            + rs.getRessourceDescription()
            + "</td><td>"
            + rs.getRessourcePage()
            + "<td><input type='button'value='Supprimer' class='slick-black' id=ressourceDelete"
            + i + " onclick = 'deleteRessource("
            + rs.getRessourceId() + ")'></td></tr>";
      }
    }

    foot = "</tbody></table></form>";
View Full Code Here


  public static Ressource getRessource(int ressourceId) {

    String sql = "CALL getRessource('" + ressourceId + "')";
    ResultSet rs = execute(sql);
    Ressource r = null;

    if (rs != null) {
      try {
        while (rs.next()) {
          r = new Ressource();
          r.setRessourceId(rs.getInt(1));
          r.setRessourceDescription(rs.getString(2));
          r.setRessourcePage(rs.getString(3));
        }
      } catch (SQLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
View Full Code Here

  public static void setUserRessources(User user) {

    String sql = "CALL userressourcelist('" + user.getUserCode() + "')";
    ResultSet rs = execute(sql);
    Ressource r = null;

    if (rs != null) {
      try {
        while (rs.next()) {
          r = new Ressource();
          r.setRessourceId(rs.getInt(1));
          r.setRessourceDescription(rs.getString(2));
          r.setRessourcePage(rs.getString(3));
          user.addRessources(r);
        }
      } catch (SQLException e) {
        e.printStackTrace();
      }
View Full Code Here

TOP

Related Classes of modele.Ressource

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.