Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.Order


  public void afterMethod() {
    dialogFixture.cleanUp();

    CustomerManager customerManager = (CustomerManager) ModelUtil
        .getBean("customerManager");
    Order order = orderManager.findByOrderNr("100100100");
    if (order != null) {
      orderManager.removeOrder(order);
    }

    Customer customer = customerManager.findByCustomerNr(100);
View Full Code Here


    ApplicationParamUtil.setApplicationParamManger(applicationParamManager);
    when(managerRepository.getOrderManager()).thenReturn(orderManager);
    when(managerRepository.getProductAreaManager()).thenReturn(
        productAreaManager);
    List<Order> orderList = new ArrayList<Order>();
    Order order = new Order();
    orderList.add(order);
    when(
        orderManager.findByConfirmWeekProductAreaGroup(anyInt(),
            anyInt(), anyInt(), (ProductAreaGroup) anyObject()))
        .thenReturn(orderList);
View Full Code Here

                 * colliManager.removeObject(colli);
                 */
              }
            }
            Deviation deviation = postShipment.getDeviation();
            Order order = postShipment.getOrder();

            if (deviation != null) {
              if (Util
                  .showConfirmDialog(
                      window.getComponent(),
View Full Code Here

  public void afterMethod() {
    dialogFixture.cleanUp();

    CustomerManager customerManager = (CustomerManager) ModelUtil
        .getBean("customerManager");
    Order order = orderManager.findByOrderNr("100100100");
    if (order != null) {
      orderManager.removeOrder(order);
    }

    Customer customer = customerManager.findByCustomerNr(100);
View Full Code Here

    cuttingFileName = editDialog.textBox("TextFieldCuttingFile").target
        .getText();
    assertEquals("0950435", cuttingFileName);

    Order order = orderManager.findByOrderNr("49838");
    assertNotNull(order);
    assertNotNull(order.getCutting());
  }
View Full Code Here

      TransportViewHandler transportViewHandler = transportWeekViewHandler
          .getTransportViewHandler(transport);
      ((TransportOrderTableModel) transportViewHandler
          .getTableModel(window)).insertRow(0, transportable);
      transportableList.remove(index);
      Order order = transportable.getOrder();
      managerRepository.getOrderManager().lazyLoad(
          order,
          new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_LINES,
              LazyLoadEnum.NONE } });
      vismaFileCreator.createVismaFileForTransport(order);
View Full Code Here

  @SuppressWarnings("unchecked")
  void registerDeviation(WindowInterface parentWindow) {
    // henter ordrenr det skal lages ettersending for
    String orderNr = JOptionPane.showInputDialog(parentWindow
        .getComponent(), "Ordrenummer:");
    Order order = null;
    // List<OrderLine> orderLinesWithoutColli = null;
    ArrayListModel orderLinesWithoutColli = null;
    if (orderNr != null) {
      // OrderManager orderManager = (OrderManager)
      // ModelUtil.getBean("orderManager");
      // finner ordre basert p� ordrenr
      order = managerRepository.getOrderManager().findByOrderNr(orderNr);

      if (order == null) {
        if (!Util.showConfirmFrame(parentWindow, "Ordre ikke funnet",
            "Ordre ble ikke funnet, vil du fortsette?")) {
          return;
        }
      } else {
        managerRepository.getOrderManager().lazyLoadOrder(
            order,
            new LazyLoadOrderEnum[] {
                LazyLoadOrderEnum.ORDER_LINES,
                LazyLoadOrderEnum.ORDER_LINE_ORDER_LINES });
        // henter ordrelinjer som ikke er pakket
        List<OrderLine> missing = order.getMissingCollies();
        if (missing != null && missing.size() != 0) {
          orderLinesWithoutColli = new ArrayListModel(missing);
        }
      }
    } else {
      if (!Util.showConfirmFrame(parentWindow, "Ordrenr ikke satt",
          "Ordrenr er ikke satt, vil du fortsette?")) {

        return;
      }
    }

    // dersom ordre ikke er funnet m� det lages en ordre
    if (order == null) {
      order = createOrder(orderNr, parentWindow);

      if (order.getOrderId() == null) {
        return;
      }
    }

    PostShipment postShipment = new PostShipment();
    postShipment.setOrder(order);
    Deviation deviation = new Deviation();
    deviation.setPostShipment(postShipment);
    deviation.setOrder(order);
    deviation.setCustomerName(order.getCustomer().getFullName());
    deviation.setCustomerNr(order.getCustomer().getCustomerNr());
    deviation.setOrderNr(order.getOrderNr());

    DeviationViewHandler deviationViewHandler = deviationViewHandlerFactory
        .create(null, false, false, false, null, true);

    DeviationModel deviationModel = new DeviationModel(deviation, true);
View Full Code Here

    List<Transport> transportList = managerRepository.getTransportManager()
        .findByObject(transport);
    if (transportList != null && transportList.size() == 1) {
      transport = transportList.get(0);
    }
    Order order = new Order();
    order.setOrderNr(orderNr);
    order.setTransport(transport);
    orderViewHandler.setEditEnabled(true);
    orderViewHandler.openOrderView(order, false, window);
    /*
     * EditOrderView editOrderView = new EditOrderView(orderViewHandler,
     * order, false); WindowInterface dialog = new JDialogAdapter(new
View Full Code Here

          login, managerRepository.getOrderManager());
      OrderComment newOrderComment = commentViewHandler
          .showAndEditOrderComment(window, null, "orderManager");

      if (newOrderComment != null) {
        Order order = postShipment.getOrder();

        if (!Hibernate.isInitialized(order.getOrderComments())) {
          orderViewHandler
              .lazyLoadOrder(
                  order,
                  new LazyLoadOrderEnum[] { LazyLoadOrderEnum.COMMENTS });
        }
        order.addOrderComment(newOrderComment);
        order.cacheComments();
        newOrderComment.setDeviation(postShipment.getDeviation());
        try {
          orderViewHandler.getOrderManager().saveOrder(order);

        } catch (ProTransException e) {
View Full Code Here

    }

  }

  private void refreshAndSaveOrder(OrderLine orderLine) {
    Order order = orderLine.getOrder();

    try {
      managerRepository.getOrderManager().refreshObject(order);
      order.setStatus(null);
      managerRepository.getOrderManager().saveOrder(order);
      managerRepository.getOrderLineManager().saveOrderLine(orderLine);
    } catch (ProTransException e) {
      Util.showErrorDialog(window, "Feil", e.getMessage());
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.model.Order

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.