Package modele

Examples of modele.Role


    String head = "";
    String foot = "";

    head = "<form id='roleList'><table><caption class='titre'>Roles disponibles</caption><thead><TR align='center'><TH>Description</TH><TH>Action</TH></TR></thead><tbody>";
    ArrayList<Role> roles = Dao.allRoles();
    Role r = null;
    if (roles.size() > 0) {
      for (int i = 0; i < roles.size(); i++) {
        r = roles.get(i);
        body = body
            + "<tr><td>"
            + r.getRoleDescription()
            + "</td><td><input type='button'value='Supprimer' class='slick-black' id=roleDel"
            + i + " onclick = 'deleteRole(" + r.getRoleId()
            + ")'></td></tr>";

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


  public static Role getRole(int roleId) {

    String sql = "CALL getRole('" + roleId + "')";
    ResultSet rs = execute(sql);
    Role r = null;

    if (rs != null) {
      try {
        while (rs.next()) {
          r = new Role();
          r.setRoleId(rs.getInt(1));
          r.setRoleDescription(rs.getString(2));
        }
      } catch (SQLException e) {
        e.printStackTrace();
      }
    }
View Full Code Here

TOP

Related Classes of modele.Role

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.