localization = !localizationButton.getSelection();
try {
if (buttonId == OK) {
if(checkMap != null && checkMap.size() > 1) {
for (String operationId : checkMap.keySet()) {
system.execute(new SetObservationPaymentCheck(operationId, observationText.getText(), !localizationButton.getSelection()));
}
for (int i = 0; i < checkControlCenter.getCheckTable().getSelection().length; i++) {
checkControlCenter.getCheckTable().getSelection()[i].setImage(0, new Image(null, !localizationButton.getSelection() ? "img/icoCheckIn.png" : "img/icoCheckOut.png"));
checkControlCenter.getCheckTable().getSelection()[i].setText(13, observationText.getText());
}
} else {
system.execute(new SetObservationPaymentCheck(operation.getId(), observationText.getText(), !localizationButton.getSelection()));
checkControlCenter.getCheckTable().getSelection()[0].setImage(0, new Image(null, !localizationButton.getSelection() ? "img/icoCheckIn.png" : "img/icoCheckOut.png"));
checkControlCenter.getCheckTable().getSelection()[0].setText(13, observationText.getText());
}
}
close();