public void insert(int month, int year, string locationName) { locationControl = new LocationControl(); attendance = new Attendance(); attendanceDB = new AttendanceDB(); int locationID = locationControl.getID(locationName); attendance.setMonth(month); attendance.setYear(year); attendance.setLocationID(locationID); attendanceDB.insert(attendance); }