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);
}
});
}
Aggregations