* @param evt
*/
private void btCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btCloseActionPerformed
try {
DialogSicklistClose dsc = new DialogSicklistClose(MainWindow.mainWindow, sicklist, getAuditManager());
dsc.setVisible(true);
if (dsc.getDlgResult() == ModalDialog.DLG_OK) {
Calendar dateToWork = dsc.getDateToWork();
if (DateTimeUtils.daysBetween(sicklist.getTill(), dateToWork) != 1) {
if (MessageBox.showConfirmYesNo(MessageBox.C_DATE_TO_WORK_BAD) == MessageBox.ANSWER_NO) {
return;
}
}
sicklist.setDateToWork(dsc.getDateToWork());
sicklist.setCloser(UserInfo.get().getCollaborator());
sicklist.setDiagnosisClose(dsc.getDiagnosisClose());
sicklist.setSerrenClosed(dsc.getSerren());
updateFields();
}
} catch (ClipsException ex) {
MessageBox.showException(ex);
}