コード例 #1
0
 public String getMyBookings() {
   if (!"NotAjax".equals(requestType)) {
     LoginDTO ldto = (LoginDTO) session.get("LoginDTO");
     String userId = ldto.getUsername();
     bdto.setUserId(userId);
     bdto = bservice.getMyBookings(bdto);
   }
   return SUCCESS;
 }
コード例 #2
0
  public String bookAccommodation() {
    String accommodationId = (String) session.get("accommodationId");
    String unitId = (String) session.get("unitId");
    LoginDTO ldto = (LoginDTO) session.get("LoginDTO");
    String userId = ldto.getUsername();
    System.out.println(accommodationId);
    System.out.println(unitId);
    System.out.println(userId);
    bdto.setAccommodationId(Integer.parseInt(accommodationId));
    bdto.setUnitId(Integer.parseInt(unitId));
    bdto.setUserId(userId);
    bdto = bservice.bookAccommodation(bdto);

    return SUCCESS;
  }