Exemplo n.º 1
0
 protected void processConfirmModel(
     String actionCode, String actionObject, HttpServletRequest request) throws SQLException {
   GosReservationMgr gosReservationMgr = (GosReservationMgr) this.getManagerFromSession(request);
   if (actionObject.equals("reservation")) {
     setHttpRequestReservation(request, gosReservationMgr);
     gosReservationMgr.getCurrentReservation().getSelectedUnit().validate();
   }
 }
Exemplo n.º 2
0
  private void setHttpRequestReservation(
      HttpServletRequest request, GosReservationMgr gosReservationMgr) {

    gosReservationMgr
        .getCurrentReservation()
        .setReservationId(request.getParameter("reservationId"));
    gosReservationMgr.getCurrentReservation().setUnitType(request.getParameter("unitType"));
    gosReservationMgr.getCurrentReservation().setUnitName(request.getParameter("unitName"));
    gosReservationMgr.getCurrentReservation().setArea(request.getParameter("area"));
    //    	 gosReservationMgr.getCurrentReservation().setCustomer(request.getParameter("customer"));
    //
    // gosReservationMgr.getCurrentReservation().setNoOfPeople(request.getParameter("noOfPeople"));
    //
    // gosReservationMgr.getCurrentReservation().setReservationDate(request.getParameter("reservationDate"));
    //
    // gosReservationMgr.getCurrentReservation().setTelephone(request.getParameter("telephone"));
    //    	 gosReservationMgr.getCurrentReservation().setEmployee(request.getParameter("employee"));
    //    	 gosReservationMgr.getCurrentReservation().setRemark(request.getParameter("remark"));
  }
Exemplo n.º 3
0
  protected void processSelectModel(
      String actionCode, String actionObject, HttpServletRequest request) throws SQLException {

    GosReservationMgr gosReservationMgr = (GosReservationMgr) this.getManagerFromSession(request);
    String key = actionCode.split("-")[2];

    if (actionObject.equals("reservation")) {
      setHttpRequestReservation(request, gosReservationMgr);
      gosReservationMgr.getCurrentReservation().validate();
      System.out.println(
          "gosReservationMgr.getCurrentReservation().isValid() : "
              + gosReservationMgr.getCurrentReservation().isValid());
      if (gosReservationMgr.getCurrentReservation().isValid()) {
        gosReservationMgr.getCurrentReservation().save();
        if (gosReservationMgr.getCurrentReservation().isValid()
            && !gosReservationMgr.getFunctionMode().equals(Constant.EDIT)) {
          ((LinkedList) gosReservationMgr.getReservationMeta().getReservationList())
              .addFirst(gosReservationMgr.getCurrentReservation());
        }
      }
    }
  }