Search in sources :

Example 26 with UserInfoException

use of eu.ggnet.dwoss.util.UserInfoException in project dwoss by gg-net.

the class DocumentUpdateView method addNonUnitPosition.

// GEN-LAST:event_addUnitAction
private void addNonUnitPosition(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_addNonUnitPosition
    Ui.exec(() -> {
        PositionType type;
        if (((JButton) evt.getSource()) == addProductBatchButton) {
            type = PositionType.PRODUCT_BATCH;
        } else if (((JButton) evt.getSource()) == addServiceButton) {
            type = PositionType.SERVICE;
        } else if (((JButton) evt.getSource()) == addCommentButton) {
            type = PositionType.COMMENT;
        } else {
            type = PositionType.SHIPPING_COST;
        }
        try {
            controller.addPosition(document.getDossier().getId(), type, null, false);
            refreshAll();
        } catch (UserInfoException ex) {
            Ui.handle(ex);
        }
    });
}
Also used : PositionType(eu.ggnet.dwoss.rules.PositionType) UserInfoException(eu.ggnet.dwoss.util.UserInfoException)

Aggregations

UserInfoException (eu.ggnet.dwoss.util.UserInfoException)26 StockUnit (eu.ggnet.dwoss.stock.ee.entity.StockUnit)7 UniqueUnit (eu.ggnet.dwoss.uniqueunit.ee.entity.UniqueUnit)5 StockUnitEao (eu.ggnet.dwoss.stock.ee.eao.StockUnitEao)4 LogicTransaction (eu.ggnet.dwoss.stock.ee.entity.LogicTransaction)4 Test (org.junit.Test)4 CustomerGeneratorOperation (eu.ggnet.dwoss.customer.ee.assist.gen.CustomerGeneratorOperation)3 UnitHistory (eu.ggnet.dwoss.event.UnitHistory)3 ReceiptGeneratorOperation (eu.ggnet.dwoss.receipt.ee.gen.ReceiptGeneratorOperation)3 RedTapeWorker (eu.ggnet.dwoss.redtapext.ee.RedTapeWorker)3 UnitOverseer (eu.ggnet.dwoss.redtapext.ee.UnitOverseer)3 ReportLine (eu.ggnet.dwoss.report.ee.entity.ReportLine)3 eu.ggnet.dwoss.rules (eu.ggnet.dwoss.rules)3 StockAgent (eu.ggnet.dwoss.stock.ee.StockAgent)3 StockTransaction (eu.ggnet.dwoss.stock.ee.entity.StockTransaction)3 Collectors (java.util.stream.Collectors)3 EJB (javax.ejb.EJB)3 Inject (javax.inject.Inject)3 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)3 Arquillian (org.jboss.arquillian.junit.Arquillian)3