Examples of OrderLineAttribute


Examples of no.ugland.utransprod.model.OrderLineAttribute

  }

  private void setWidth(Ordln ordln,OrderLine garageOrderLine) {
    BigDecimal vismaWidth = getVismaWidth(ordln);
    if(vismaWidthHasValue(vismaWidth)){
      OrderLineAttribute attribute = garageOrderLine.getAttributeByName(WIDTH_ATTRIBUTE);
      attribute.setAttributeValue(String.valueOf(vismaWidth.setScale(0)));
    }
   
  }
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLineAttribute

    return ordln;
  }

  private void setBrickWallHeigth(OrderLine garageOrderLine, Ord ord) {
    if(hasBrickWallHeigth(ord)){
      OrderLineAttribute attribute = garageOrderLine.getAttributeByName(BRICK_WALL_HEIGHT_ATTRIBUTE);
      attribute.setAttributeValue(getBrickWallHeigth(ord));
    }
   
  }
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLineAttribute

    return ord.getFree2()!=null?true:false;
  }

  private void setWallHeigth(OrderLine garageOrderLine, Ord ord) {
    if(hasWallHeigth(ord)){
      OrderLineAttribute attribute = garageOrderLine.getAttributeByName(WALL_HEIGHT_ATTRIBUTE);
      attribute.setAttributeValue(getWallHeigth(ord));
    }
   
  }
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLineAttribute

    if (selectedNode != null && selectedNode.isLeaf()) {

      BufferedValueModel bufferedOrderLines = presentationModel
          .getBufferedModel(ICostableModel.PROPERTY_ORDER_LINE_ARRAY_LIST_MODEL);

      OrderLineAttribute attribute = (OrderLineAttribute) selectedNode
          .getObject();
      OrderLine orderLine = attribute.getOrderLine();
      orderLine.setHasArticle(null);
      orderLine.setAttributeInfo(null);
      orderLine.removeAllOrderLineAttributeInfo();
      orderLine.setIsDefault(null);

      String attributeValue;
      if (attribute.isYesNo()) {
        attributeValue = (String) JOptionPane.showInputDialog(window
            .getComponent(), "Gi ny verdi", "Endre verdi",
            JOptionPane.QUESTION_MESSAGE, null, new Object[] {
                "Ja", "Nei" }, attribute.getAttributeValue());
      } else if (attribute.getChoices() != null
          && attribute.getChoices().size() != 0) {
        attributeValue = (String) JOptionPane.showInputDialog(window
            .getComponent(), "Gi ny verdi", "Endre verdi",
            JOptionPane.QUESTION_MESSAGE, null, attribute
                .getChoices().toArray(), attribute
                .getAttributeValue());
      } else {

        attributeValue = JOptionPane.showInputDialog(window
            .getComponent(), "Gi ny verdi", attribute
            .getAttributeValue());
      }

      if (attributeValue != null && attributeValue.length() != 0) {
        if (!StringUtils.isEmpty(attribute.getAttributeDataType())
            && !AttributeDataType.valueOf(
                StringUtils.upperCase(attribute
                    .getAttributeDataType())).isValid(
                attributeValue)) {
          Util.showErrorDialog(window, "Feil datatype",
              "Attributt har feil datatype");

        } else {
          attribute.setAttributeValue(attributeValue);

          OrderWrapper<T, E> orderWrapper = (OrderWrapper<T, E>) ((OrderLineTreeNode) orderLineTreeTableModel
              .getRoot()).getObject();
          calculateAttributes(orderWrapper.getOrderLines());
          bufferedOrderLines.setValue(new ArrayListModel(orderWrapper
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLineAttribute

  private void createNewOrderLineAttribute(OrderLine orderLineMain,
      Set<OrderLineAttribute> orderLineAttributes,
      ArticleTypeAttribute articleTypeAttribute) {
    if (!articleTypeAttribute.getIsInactive()) {
      orderLineAttributes.add(new OrderLineAttribute(null, orderLineMain,
          null, null, articleTypeAttribute, null, null,
          articleTypeAttribute.getAttribute().getName()));
    }
  }
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLineAttribute

        if (attributes != null) {
          orderLineAttributes = new HashSet<OrderLineAttribute>();

          for (ArticleTypeAttribute attribute : attributes) {
            orderLineAttributes.add(new OrderLineAttribute(null,
                orderLine, null, null, attribute, null, null,
                attribute.getAttribute().getName()));
          }

          openAttributeView(orderLine, orderLineAttributes);
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLineAttribute

        if (attributes != null) {
          orderLineAttributes = new LinkedHashSet<OrderLineAttribute>();

          for (ConstructionTypeArticleAttribute attribute : attributes) {
            orderLineAttributes.add(new OrderLineAttribute(null,
                orderLine, attribute, null, null, attribute
                    .getAttributeValue(), attribute
                    .getDialogOrder(), attribute
                    .getAttributeName()));
          }
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLineAttribute

    postShipmentManager.savePostShipment(postShipment2);
  }

  private void setTakstolVinkel(Integer vinkel) throws ProTransException {
    OrderLine orderLine = order.getOrderLine("Takstoler");
    OrderLineAttribute attribute = orderLine.getAttributeByName("Vinkel");
    attribute.setAttributeValue(String.valueOf(vinkel));
    orderManager.saveOrder(order);
  }
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLineAttribute

    orderManager.saveOrder(order);
  }

  private void setStaaendeTak() throws ProTransException {
    OrderLine orderLine = order.getOrderLine("Takstoler");
    OrderLineAttribute attribute = orderLine
        .getAttributeByName("St�ende tak");
    attribute.setAttributeValue("Ja");
    orderManager.saveOrder(order);
  }
View Full Code Here

Examples of no.ugland.utransprod.model.OrderLineAttribute

    OrderLine orderLineMain;
    orderLineMain = OrderLine.getInstance(order, 0, null);
    orderLineAttributes = new LinkedHashSet<OrderLineAttribute>();

    for (ConstructionTypeAttribute attribute : attributes) {
      orderLineAttributes.add(new OrderLineAttribute(null, orderLineMain,
          null, attribute, null, attribute.getAttributeValue(),
          attribute.getDialogOrder(), attribute.getAttributeName()));
    }
    orderLineMain.setOrderLineAttributes(orderLineAttributes);
    orderLines.add(orderLineMain);
    orderLineMain.setArticlePath(orderLineMain.getGeneratedArticlePath());

    Set<ConstructionTypeArticle> articles = order.getConstructionType()
        .getConstructionTypeArticles();

    if (articles != null && articles.size() != 0) {
      Set<ConstructionTypeArticleAttribute> articleAttributes;
      if (articles.size() != 0) {
        for (ConstructionTypeArticle article : articles) {
          orderLineMain = OrderLine.getInstance(order, article,
              article.getNumberOfItems(), article
                  .getDialogOrder(), null,
              article.getOrdNo(), article.getLnNo());

          constructionTypeManager
              .lazyLoadArticle(
                  article,
                  new LazyLoadConstructionTypeArticleEnum[] { LazyLoadConstructionTypeArticleEnum.ATTRIBUTES });

          articleAttributes = article.getAttributes();

          if (articleAttributes != null
              && articleAttributes.size() != 0) {
            orderLineAttributes = new LinkedHashSet<OrderLineAttribute>();
            for (ConstructionTypeArticleAttribute articleAttribute : articleAttributes) {
              orderLineAttributes.add(new OrderLineAttribute(
                  null, orderLineMain, articleAttribute,
                  null, null, articleAttribute
                      .getAttributeValue(),
                  articleAttribute.getDialogOrder(),
                  articleAttribute.getAttributeName()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.