private void addDetailsToListButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addDetailsToListButtonActionPerformed
        //SYG hardcoded crime. skift snarligt
        int resTypeID = 0;
        if (dropDownRes.getSelectedItem().equalsIgnoreCase("Lille Stang"))
        {
            resTypeID = 1;
        }
        else if (dropDownRes.getSelectedItem().equalsIgnoreCase("Medium Stang"))
        {
            resTypeID = 2;
        }
        else if (dropDownRes.getSelectedItem().equalsIgnoreCase("Stor Stang"))
        {
            resTypeID = 3;
        }
        else if (dropDownRes.getSelectedItem().equalsIgnoreCase("1337 Stang"))
        {
            resTypeID = 4;
        }

        if(control.checkRessourceAvailability(resTypeID, currentOrder.formatDateToString(currentOrder.getStartDate()),
            currentOrder.formatDateToString(currentOrder.getEndDate()), Integer.parseInt(resourceAmountTextField.getText()))){

        for (OrderDetail cod : control.createVerifiedOrderDetails(resTypeID,
            Integer.parseInt(resourceAmountTextField.getText()), currentOrder)) {
        currentOrderDetails.add(cod);
        }

        for (OrderDetail currentOrderDetail : currentOrderDetails) {
            resourceListTextArea.setText(resourceListTextArea.getText()+currentOrderDetail+"\n");
        }
        }
        else JOptionPane.showMessageDialog(rootPane, "Der er ikke nok ressourcer i den valgte periode.");
    }//GEN-LAST:event_addDetailsToListButtonActionPerformed