Пример #1
0
 private void getSchedule(Date selectedDate) {
   if (currentCrew != null) {
     EntryTime entry = entryTimeDao.getByDateAndCrew(getDate(selectedDate), currentCrew);
     if (entry != null) {
       timeSheet.setSchedule(entry.getSchedule());
       txtComments.setText(entry.getComments());
     } else {
       ScheduleTemplate template =
           new ScheduleTemplateDAO()
               .getByCrew(currentCrew, chkOnPort.isSelected(), currentCrew.isWatchKeeper());
       if (template != null) timeSheet.setSchedule(template.getSchedule());
     }
   }
 }