Package it.hotel.controller.booking.DTO

Examples of it.hotel.controller.booking.DTO.BookingDTO


  @Override
  protected ModelAndView processFinish(HttpServletRequest arg0,
      HttpServletResponse arg1, Object command, BindException arg3)
  throws Exception {
    this.setProperties(command);
    BookingDTO booking = (BookingDTO) command;
    Booking tempBooking = (Booking) bookingManager.get(booking.getId());
    bookingManager.remove(tempBooking);
    GregorianCalendar begindateCalendar = booking.getBeginDate();
    GregorianCalendar finishdateCalendar = booking.getFinishDate();
    if(!bookingManager.isVacant(booking.getRoom(), begindateCalendar, finishdateCalendar)){
      tempBooking.setId(0);
      bookingManager.add(tempBooking);
      return new ModelAndView(getFailurePage(), "roomNumber", booking.getRoom().getNumber());
    }else{
      booking.setId(0);
            Booking newBooking = createBookingFromBookingDTO(booking);
     
      bookingManager.add(newBooking);
    }   
    return new ModelAndView(getSuccessView());
View Full Code Here


   */
  protected Map referenceData (HttpServletRequest req) throws Exception{
    Map map = new HashMap();
    String id= req.getParameter("idBooking");
    Booking  booking =(Booking)(bookingManager.get(Integer.parseInt(id)));
    BookingDTO bookingDTO = new BookingDTO(booking);
    ArrayList<Structure>  hotels = new  ArrayList<Structure>();
    hotels.add(booking.getStructure());
    map.put("hotels", hotels);
    map.put("booking", bookingDTO);
    map.put("customer", booking.getCustomer());
View Full Code Here

TOP

Related Classes of it.hotel.controller.booking.DTO.BookingDTO

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.