try {
String id = (idRegistration == null) ? (String) system.query(new GetRegistrationId()) : idRegistration;
system.execute(new AddRegistration(id, ((RegistrationControlCenter) controlCenter).getId(), courseIdList, getAddition(), getDiscounting(), getCourseTotalValue(), new SimpleDateFormat("dd/MM/yyyy").format(new GDDate().getDate()), getDuration(), getParcelList(), true, system.getLogged(), new Money(pontualityDiscountingText.getText())));
((RegistrationControlCenter) controlCenter).loadScreen(((RegistrationControlCenter) controlCenter).getId());
close();
} catch (TransactionDateException e) {
setErrorMessage(MessageConstants.TRANSACTION_DATE_EXCEPTION);
} catch (Exception e) {