예제 #1
0
  // 生成删除用户的用户html代码
  public String generateAdminUserDelHtml(List<TUser> users) {
    String listHtml = "";
    int size = users.size();
    for (int i = 0; i < size; i++) {
      TUser user = users.get(i);
      String item = "";

      item += "<tr id='" + user.getUser_ID() + "' class='noteItem'>";
      item += "	<td>";
      item += "		<div class='checker'>";
      item += "			<span>";
      item += "				<input class='checkboxes' type='checkbox' value='1'>";
      item += "			</span>";
      item += "		</div>";
      item += "	</td>";
      item += "	<td>" + user.getUser_ID() + "</td>";
      item += "	<td>" + user.getUser_Account() + "</td>";
      item += "	<td>" + user.getUser_Email() + "</td>";
      item += "	<td>";
      item +=
          "		<a class='delete' onclick='oneDel("
              + user.getUser_ID()
              + ")' href='javascript:void(0)'>删除</a>";
      item += "	</td>";
      item += "</tr>";

      listHtml += item;
    }
    return listHtml;
  }
예제 #2
0
  // 生成更新用户的用户html代码
  public String generateAdminUserUpdateHtml(List<TUser> users) {
    String listHtml = "";
    int size = users.size();
    for (int i = 0; i < size; i++) {
      TUser user = users.get(i);
      String item = "";

      item += "<tr id='" + user.getUser_ID() + "' class='noteItem'>";
      item += "	<td>" + user.getUser_ID() + "</td>";
      item += "	<td>" + user.getUser_Account() + "</td>";
      item += "	<td>" + user.getUser_Email() + "</td>";
      item += "	<td>";
      item +=
          "		<a class='delete' onclick='update("
              + user.getUser_ID()
              + ")' href='javascript:void(0)'>修改</a>";
      item += "	</td>";
      item += "</tr>";

      listHtml += item;
    }
    return listHtml;
  }