private void deleteBookingButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteBookingButtonActionPerformed
        int reply = jOptionPane.showConfirmDialog(this, "Are you sure you want to delete this booking?", "Delete?", jOptionPane.YES_NO_OPTION);
        if (reply == jOptionPane.YES_OPTION) {
            boolean deleteSuccess;
            boolean commitSuccess;
            if (bookingTable.getSelectedRow() > -1) {
                int selectedRowIndex = bookingTable.getSelectedRow();
                int bookingId = (Integer) bookingTableModel.getValueAt(selectedRowIndex, 0);
                deleteSuccess = ctr.deleteBookingFromDB(bookingId);
                if (deleteSuccess) {
                    commitSuccess = ctr.commitTransaction();
                    if (commitSuccess) {
                        jOptionPane.showMessageDialog(this, "Booking deleted!");
                        refreshBookingTable(bookingTableModel);
                    }
                    else {
                        jOptionPane.showMessageDialog(this, "Fail in commit", "Commit failed", jOptionPane.ERROR_MESSAGE);
                    }
                }
                else {
                    jOptionPane.showMessageDialog(this, "Something went wrong with the deletion", "Delete failed", jOptionPane.ERROR_MESSAGE);
                }
            }
            else {
                jOptionPane.showMessageDialog(this, "You must choose a booking!");
            }
        }
    }//GEN-LAST:event_deleteBookingButtonActionPerformed