Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.Order


   * @param window
   * @return ordre
   */
  public Transportable searchOrder(WindowInterface window,
      boolean includePostShipment) {
    Order searchOrder = new Order();
    boolean isCanceled = openOrderView(searchOrder, true, window);
    Transportable transportable = null;
    if (!isCanceled) {

      OrderManager orderManager = (OrderManager) ModelUtil
View Full Code Here


        return orderLine;
    }

    protected void saveOrder(WindowInterface window, OrderLineManager orderLineManager, OrderLine orderLine) {
        OrderManager orderManager = (OrderManager) ModelUtil.getBean("orderManager");
        Order order = orderLine.getOrder();
        order.setStatus(null);
        try {
            orderManager.saveOrder(order);
            orderLineManager.saveOrderLine(orderLine);
        } catch (ProTransException e) {
            Util.showErrorDialog(window, "Feil", e.getMessage());
View Full Code Here

     * @param applied
     * @throws ProTransException
     */
    protected void checkCompleteness(OrderLine orderLine, boolean applied) throws ProTransException {
        if (orderLine != null) {
            Order order = orderLine.getOrder();
            if (order != null) {
                OrderManager orderManager = (OrderManager) ModelUtil.getBean("orderManager");
                if (applied) {
                    orderManager.lazyLoadOrder(order, new LazyLoadOrderEnum[] {
                            LazyLoadOrderEnum.ORDER_LINES, LazyLoadOrderEnum.ORDER_LINE_ORDER_LINES });
                    if (order.isDonePackage()) {
                        order.setOrderComplete(Util.getCurrentDate());
                        orderManager.saveOrder(order);
                    }
                } else {
                    order.setOrderComplete(null);
                    orderManager.saveOrder(order);
                }
            } else {
                PostShipment postShipment = orderLine.getPostShipment();
                if (postShipment != null) {
View Full Code Here

   * @see javax.swing.table.TableModel#getValueAt(int, int)
   */
  public Object getValueAt(int row, int column) {
    OrderLine orderLine = (OrderLine) getRow(row);

    Order order = orderLine.getOrder();
       

    switch (column) {
    case 0:
      return order.getDeliveryAddress();
    case 1:
      return order.getCustomer().getFirstName();
    case 2:
      return order.getCustomer().getLastName();
    case 3:
      return order.getPostalCode();
    case 4:
      return order.getPostOffice();
    case 5:
      return order.getOrderNr();
    case 6:
      return order.getCustomer().getCustomerNr();
    case 7:
      return order.getTelephoneNr();
    case 8:
      return "Etterlevering";
    case 9:
      return articleCount;
    case 10:
View Full Code Here

     * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
     */
    public void propertyChange(PropertyChangeEvent event) {
      String orderNr = (String) event.getNewValue();
      if (orderNr != null) {
        Order order = ((OrderManager) overviewManager)
            .findByOrderNr(orderNr);

        if (order != null) {
          Util.showMsgDialog(window.getComponent(),
              "Ordre finnes fra f�r", "Ordre finnes fra f�r");
View Full Code Here

        default:
            return getValueAtOrder(rowIndex, columnIndex);
        }*/
    }
    private Object getValueAtConfirmReport(int rowIndex, int columnIndex) {
        Order order = (Order) getRow(rowIndex);

        switch (columnIndex) {
        case 0:
            return order.getCustomer();
        case 1:
            return order.getOrderNr();
        case 2:
            return order.getDeliveryAddress();
        case 3:
            return order.getPostalCode();
        case 4:
            return order.getPostOffice();

        case 5:
            return order.getConstructionType();
        case 6:
            return order.getTransport();
        case 7:
            return order.getCost("Egenproduksjon", "Kunde");
        case 8:
            return order.getCost("Frakt", "Kunde");
        case 9:
            return order.getCost("Montering", "Kunde");
        case 10:
            return order.getCost("Egenproduksjon", "Intern");
        case 11:
            return order.getContributionRate();
        default:
            throw new IllegalStateException("Unknown column");
        }

    }
View Full Code Here

     * @param rowIndex
     * @param columnIndex
     * @return verdi
     */
    public Object getValueAtAssembly(int rowIndex, int columnIndex) {
        Order order = (Order) getRow(rowIndex);
        switch (columnIndex) {
        case 0:
            return order.getConstructionType();
        case 1:
            return order.getPostalCode();
        case 2:
            return order.getPostOffice();
        case 3:
            return order;
        case 4:
            return order.getOrderNr();
        case 5:
            return order.getDeliveryAddress();
        case 6:
            return order.getTransport();
            // case 7:return order.getComment();
        default:
            throw new IllegalStateException("Unknown column");
        }

View Full Code Here

     * @param rowIndex
     * @param columnIndex
     * @return verdi
     */
    public Object getValueAtTransport(int rowIndex, int columnIndex) {
        Order order = (Order) getRow(rowIndex);

        Map<String, String> statusMap = Util.createStatusMap(order.getStatus());
        switch (columnIndex) {
        case 0:
            return order.getDeliveryWeek();
        case 1:
            return order.getConstructionType();
        case 2:
            if (order.doAssembly()) {
                if (order.getAssembly() != null) {
                    return "M" + order.getAssembly().getAssemblyWeek();
                }
                return "M";
            }
            return null;
        case 3:
            return order.getPostalCode();
        case 4:
            return order.getPostOffice();
        case 5:
            return statusMap.get(steinChecker.getArticleName());
        case 6:
            return order;
        case 7:
            return order.getOrderNr();
        case 8:
            return order.getDeliveryAddress();
        case 9:
            return order.getProductAreaGroup().getProductAreaGroupName();

            // case 8:return order.getComment();
        default:
            throw new IllegalStateException("Unknown column");
        }
View Full Code Here

    /**
     * @param order
     */
    public void setOrder(Order order) {
        Order oldOrder = getOrder();
        object.setOrder(order);
        firePropertyChange(PROPERTY_ORDER, oldOrder, order);
    }
View Full Code Here

   *
   * @param orgOrder
   * @return klonet ordre
   */
  public static Order cloneOrder(Order orgOrder) {
    Order clonedOrder = new Order();
    clonedOrder.setOrderId(orgOrder.getOrderId());
    clonedOrder.setConstructionType(orgOrder.getConstructionType());
    clonedOrder.setOrderLines(cloneOrderLines(orgOrder.getOrderLines()));

    return clonedOrder;
  }
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.