Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.Order


    Supplier supplier = supplierManager.findByName("T.O.Bull AS");
    transport.setSupplier(supplier);

    transportManager.saveTransport(transport);

    order = new Order();

    customer = new Customer();

    customer.setCustomerNr(100);
    customer.setFirstName("Atle");
View Full Code Here


    orderManager.saveOrder(order);

  }

  private void setUpTakstolOrder() throws Exception {
    takstolOrder = new Order();

    takstolCustomer = new Customer();

    takstolCustomer.setCustomerNr(100100);
    takstolCustomer.setFirstName("Ask");
View Full Code Here

    ConstructionTypeManager constructionTypeManager = (ConstructionTypeManager) ModelUtil
        .getBean(ConstructionTypeManager.MANAGER_NAME);
    final ProductAreaManager productAreaManager = (ProductAreaManager) ModelUtil
        .getBean(ProductAreaManager.MANAGER_NAME);

    order = new Order();
    Set<OrderLine> orderLines = new HashSet<OrderLine>();
    OrderLine orderLine = new OrderLine();
    orderLine.setOrder(order);
    orderLine.setArticlePath("articlePath");
    orderLines.add(orderLine);
View Full Code Here

    List<PacklistV> liste = packlistVManager.findAllApplyable();
    PacklistV packlistV = liste.get(0);
    assertFalse(liste.isEmpty());
    assertNull(packlistV.getProductionBasis());

    Order order = orderManager.findByOrderNr(packlistV.getOrderNr());
    order.setProductionBasis(Integer.valueOf(70));
    orderManager.saveOrder(order);

    liste = packlistVManager.findApplyableByOrderNr(packlistV.getOrderNr());
    assertEquals(1, liste.size());
    assertEquals(Integer.valueOf(70), liste.get(0).getProductionBasis());

    order = orderManager.findByOrderNr(packlistV.getOrderNr());
    order.setProductionBasis(null);
    orderManager.saveOrder(order);

  }
View Full Code Here

          .getElementAt(table
              .convertRowIndexToModel(objectSelectionList
                  .getSelectionIndex()));
      OrderManager orderManager = (OrderManager) ModelUtil
          .getBean("orderManager");
      Order order = orderManager.findByOrderNr(applyable.getOrderNr());
      if (order != null) {
        DeviationViewHandler deviationViewHandler = deviationViewHandlerFactory
            .create(order, true, false, true, null, false);
        deviationViewHandler.registerDeviation(order, window);
      }
View Full Code Here

      Applyable applyable = (Applyable) objectSelectionList
          .getElementAt(table
              .convertRowIndexToModel(objectSelectionList
                  .getSelectionIndex()));

      Order order = managerRepository.getOrderManager().findByOrderNr(
          applyable.getOrderNr());
      if (order != null) {
        OrderComment orderComment = new OrderComment();
        orderComment.setUserName(login.getApplicationUser()
            .getUserName());
        orderComment.setCommentDate(Util.getCurrentDate());
        orderComment.addCommentType(CommentTypeUtil
            .getCommentType("Ordre"));

        CommentViewHandler orderCommentViewHandler = new CommentViewHandler(
            login, managerRepository.getOrderManager());
        EditCommentView editDeviationCommentView = new EditCommentView(
            new OrderCommentModel(orderComment),
            orderCommentViewHandler);

        JDialog dialog = Util.getDialog(window, "Legg til kommentar",
            true);
        dialog.setName("EditDeviationCommentView");
        WindowInterface dialogWindow = new JDialogAdapter(dialog);
        dialogWindow.add(editDeviationCommentView
            .buildPanel(dialogWindow));
        dialog.pack();
        Util.locateOnScreenCenter(dialog);
        dialogWindow.setVisible(true);

        if (!orderCommentViewHandler.isCanceled()) {
          orderComment.setOrder(order);
          managerRepository
              .getOrderManager()
              .lazyLoadOrder(
                  order,
                  new LazyLoadOrderEnum[] { LazyLoadOrderEnum.COMMENTS });
          order.addOrderComment(orderComment);
          try {
            managerRepository.getOrderManager().saveOrder(order);
          } catch (ProTransException e) {
            Util.showErrorDialog(window, "Feil", e.getMessage());
            e.printStackTrace();
View Full Code Here

    ApplicationParamUtil.setApplicationParamManger(applicationParamManager);
    OrderLine orderLine = new OrderLine();
    ArticleType articleType = new ArticleType();
    articleType.setArticleTypeName("test");
    orderLine.setArticleType(articleType);
    final Order order = new Order();
    order.setOrderNr("1");
    orderLine.setOrder(order);
    final Colli colli = new Colli();
    colli.setColliName("test");
    orderLine.setColli(colli);
    when(orderLineManager.findByOrderLineId(anyInt()))
View Full Code Here

        final TakstolProductionVManager takstolProductionVManager = mock(TakstolProductionVManager.class);
        TakstolStatusChecker takstolStatusChecker = new TakstolStatusChecker(articleType,takstolPackageVManager, takstolProductionVManager);

        final List<OrderLine> orderLineList = new ArrayList<OrderLine>();
        OrderLine orderLine = new OrderLine();
        Order order = new Order();
        order.setOrderNr("1");
        order.addOrderLine(orderLine);
        orderLine.setOrder(order);
        orderLine.setArticlePath("Takstoler");
        orderLine.setOrderLineId(1);
        orderLineList.add(orderLine);
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

    editDialog.button("SaveOrder").click();
    editDialog.button("SaveOrder").requireDisabled();

    assertEquals(count + 1, tableFixture.target.getModel().getRowCount());

    Order order = new Order();
    order.setOrderNr("100100100");
    List<Order> orders = orderManager.findByObject(order);
    assertNotNull(orders);
    assertEquals(1, orders.size());
    order = orders.get(0);

    orderManager.lazyLoadOrder(order,
        new LazyLoadOrderEnum[] { LazyLoadOrderEnum.COMMENTS });

    Set<OrderComment> comments = order.getOrderComments();
    assertNotNull(comments);
    assertEquals(1, comments.size());
    OrderComment orderComment = comments.iterator().next();
    Set<OrderCommentCommentType> commentTypes = orderComment
        .getOrderCommentCommentTypes();
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.