public boolean saveEmployee(ArrayList<Employee> employee, Connection con) {

        boolean didItWork = true;
        int tal=0;
        String SQLString1 = "insert into medarbejder values(?,?,?,?,?,?,?,?)";
        String SQLString2 = "select medarbejderseq.nextval from dual";
        String SQLString3 = "insert into medarbejderdetails values(?,?)";
        PreparedStatement statement = null;
        Calendar cal = Calendar.getInstance();
        Date joinDate = cal.getTime();
        java.sql.Date sqlDate = new java.sql.Date(joinDate.getTime());
        
        
           for (int j = 0; j < employee.size(); j++) {
            Employee etest = employee.get(j);

            if (etest.getEmployeeID()!= 0) {
                tal++;
            }
        }
        
        

        try {
            statement = con.prepareStatement(SQLString2);
            ResultSet rs = statement.executeQuery();
            if (rs.next()) {
                for (int j = tal; employee.size() > j; j++) {
                    Employee o = employee.get(j);
                    o.setEmployeeID(rs.getInt(1));
                }

                statement = con.prepareStatement(SQLString1);
                for (int i = tal; i < employee.size(); i++) {
                    Employee emp = employee.get(i);
                    statement.setInt(1, emp.getEmployeeID());
                    statement.setString(2, emp.getName());
                    statement.setString(3, emp.getPosition());
                    statement.setString(4, emp.getPhoneNumber());
                    statement.setString(5, emp.getEmail());
                    statement.setString(6, emp.getZipCode());
                    statement.setString(7, emp.getAdress());
                    statement.setString(8, emp.getCity());
                    statement.executeUpdate();
                    
                }
                statement = con.prepareStatement(SQLString3);
                for(int k = tal; k<employee.size(); k++){
                    Employee em = employee.get(k);
                    statement.setInt(1,em.getEmployeeID());
                    statement.setDate(2, sqlDate);
//                statement.setInt(3, em.getOrdreNo());
                    
                }

            }

            statement.executeUpdate();

        } catch (Exception e) {
            didItWork = false;
            System.out.println("Fejl i OrdreMapper - SaveNewProject");
            e.printStackTrace();
        }
        return didItWork;

    }