Search in sources :

Example 1 with ResolveResult

use of eu.ggnet.dwoss.misc.ee.ResolveRepayment.ResolveResult in project dwoss by gg-net.

the class ResolveRepaymentController method handleResolveButtonAction.

@FXML
public void handleResolveButtonAction() {
    if (sopoField.getText().isEmpty()) {
        sopoField.setText(" IDENTIFIER EINGEBEN!!!!!");
        return;
    }
    resolveButton.setDisable(true);
    ForkJoinPool.commonPool().execute(() -> {
        try {
            ResolveResult result = Dl.remote().lookup(ResolveRepayment.class).resolveUnit(sopoField.getText(), contractor, Dl.local().lookup(Guardian.class).getUsername(), commentField.getText());
            Ui.build(sopoField).alert().title("Repayment resolved").message("Gutschrift gegenüber " + contractor.getName() + " aufgelöst").nl("Stock: " + result.stockMessage).nl("RedTape: " + result.redTapeMessage).nl("Report: " + result.reportMessage).show(AlertType.INFO);
            reset();
        } catch (UserInfoException ex) {
            Ui.handle(ex);
        } finally {
            reset();
        }
    });
}
Also used : ResolveRepayment(eu.ggnet.dwoss.misc.ee.ResolveRepayment) UserInfoException(eu.ggnet.dwoss.util.UserInfoException) ResolveResult(eu.ggnet.dwoss.misc.ee.ResolveRepayment.ResolveResult) FXML(javafx.fxml.FXML)

Aggregations

ResolveRepayment (eu.ggnet.dwoss.misc.ee.ResolveRepayment)1 ResolveResult (eu.ggnet.dwoss.misc.ee.ResolveRepayment.ResolveResult)1 UserInfoException (eu.ggnet.dwoss.util.UserInfoException)1 FXML (javafx.fxml.FXML)1