private void addGuestToBookingButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addGuestToBookingButtonActionPerformed
        boolean addGuestSuccess;
        Booking currentBooking = ctr.getCurrentBooking();
        if (currentBooking != null && guestJList2.getSelectedValue() != null) {
            Guest guest = (Guest) guestJList2.getSelectedValue();
            if (!addedGuestsModel.contains(guest)) {
                if (ctr.checkRoomAvailability(currentBooking, addedGuestsModel.getSize()) > 0) {
                    addGuestSuccess = ctr.createBookingDetail(guest, currentBooking);
                    if (addGuestSuccess) {
                        addedGuestsModel.addElement(guest);
                        addedGuestsJList.setModel(addedGuestsModel);
                        jOptionPane.showMessageDialog(this, guest.getFirstName() + " " + guest.getLastName() + " added to roomNo " + currentBooking.getRoomNo());
                    }
                    else {
                        jOptionPane.showMessageDialog(this, "Could not add guest to room.\nGuest might already be booked to a room in that period.", "Error.", jOptionPane.INFORMATION_MESSAGE);
                    }
                }
                else {
                    jOptionPane.showMessageDialog(this, "Cannot add guest because room is full!", "Room is full.", jOptionPane.INFORMATION_MESSAGE);
                }
            }
            else {
                jOptionPane.showMessageDialog(this, "Guest already added!", "Error.", jOptionPane.INFORMATION_MESSAGE);
            }
        }
    }//GEN-LAST:event_addGuestToBookingButtonActionPerformed