if (productArea != null && !searching) {
order.setProductArea(productArea);
}
}
EditOrderView editOrderView = new EditOrderView(this, order, searching,
project);
WindowInterface dialog = new JDialogAdapter(Util.getDialog(window,
"Ordre", true));
dialog.setName("EditOrderView");
dialog.add(editOrderView.buildPanel(dialog));
dialog.pack();
Util.locateOnScreenCenter(dialog);
if (!forIncomingOrder) {
editOrderView.resetBuffering();
}
dialog.setVisible(true);
if (editOrderViewIsSearching(editOrderView)) {
OrderModel orderModel = editOrderView.getOrderModel();
orderModel.viewToModel();
try {
setCustomerSearchData(order, dialog, orderModel);
} catch (ProTransException e) {
Util.showErrorDialog(dialog, "Feil", e.getMessage());
return false;
}
}
return editOrderView.isCanceled();
}