private void jButtonSaveOrderActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButtonSaveOrderActionPerformed
    {//GEN-HEADEREND:event_jButtonSaveOrderActionPerformed
        if (jTextFieldCustomerNo.getText().isEmpty())
        {
            JOptionPane.showMessageDialog(null, "Der mangler et kunde nummer");
        } else
        {
            int kundeNo = 0;
            try
            {
                kundeNo = Integer.parseInt(jTextFieldCustomerNo.getText());
            } catch (Exception e)
            {
                JOptionPane.showMessageDialog(null, "KundeNo skal være hel tal");
            }
            Calendar cal = Calendar.getInstance();
            Date date = (Date) cal.getTime();
            String dag = jComboBoxDag.getSelectedItem().toString();
            String måned = jComboBoxMaaned.getSelectedItem().toString();
            String aar = jComboBoxAar.getSelectedItem().toString();
            String dato = aar + måned + dag;
            DateFormat newDate = new SimpleDateFormat("yyyyMMdd");
            try
            {
                date = newDate.parse(dato);
            } catch (ParseException ex)
            {
                Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);
            }
            ArrayList<Customer> customerlist = control.loadCustomerlist();
            for (int i = 0; i < customerlist.size(); i++)
            {

                if (customerlist.get(i).getCustomerID() == kundeNo && kundeNo != 0)
                {
                    control.createOrder(orderItemList, customerlist.get(i), date);
                    modelVareTilOrdre.clear();
                    jTextFieldCustomerNo.setText("");
                }
            }
            try
            {
                    String ordreNummer = control.saveOrder();
                    jLabelOrderSavedNotSaved.setText("Ordre nummer: " + ordreNummer);
                    int ordreNo = Integer.parseInt(ordreNummer);
                        for (int i = 0; i < orderItemList.size(); i++)
                    {
                        if (orderItemList.get(i).getItemName().equals("Telt"))
                        {
                            Employee employee1 = new Employee(emp.get(0).getEmployeeID(), date, ordreNo);
                            Employee employee2 = new Employee(emp.get(1).getEmployeeID(), date, ordreNo);
                            control.saveEmployeeWithDate(employee1);
                            control.saveEmployeeWithDate(employee2);
                        }
                    }
                    control.loadOrdersWithDate(date);
                    visVareliste();
            } catch (SQLException ex)
            {
                Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);
            }
            orderItemList.clear();
        }
    }//GEN-LAST:event_jButtonSaveOrderActionPerformed