Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.Deviation


        List<ArticleType> newArticles = articleTypeView
            .getSelectedObjects();
        List<OrderLine> newOrderLines = new ArrayList<OrderLine>();
        if (newArticles != null && newArticles.size() > 0) {
          Deviation deviation = ((DeviationModel) presentationModel
              .getBean()).getObject();
          for (ArticleType article : newArticles) {
            newOrderLines
                .add(new OrderLine(
                    null,
View Full Code Here


     * @param columnIndex
     * @return verdi
     */
    public Object getValueAt(int rowIndex, int columnIndex) {
      if (rowIndex < getRowCount()) {
        Deviation deviation = (Deviation) getRow(rowIndex);
        if (isForOrderInfo) {
          return getValueAtForOrderInfo(deviation, columnIndex);
        } else if (isForExcel) {
          return getValueAtForExcel(deviation, columnIndex);
        }
View Full Code Here

    /**
     * @see no.ugland.utransprod.util.Threadable#doWork(java.lang.Object[],
     *      javax.swing.JLabel)
     */
    public Object doWork(Object[] params, JLabel labelInfo) {
      Deviation deviation = ((DeviationModel) presentationModel.getBean())
          .getObject();
      if (deviation != null) {
        labelInfo.setText("Genererer utskrift...");

        ReportViewer reportViewer = new ReportViewer("Avvik",
            mailConfig);

        JDialog dialog = Util.getDialog(owner, "Avvik", true);
        WindowInterface window = new JDialogAdapter(dialog);

        window.add(reportViewer.buildPanel(window));

        try {
          List<Deviation> list = new ArrayList<Deviation>();
          list.add(deviation);
          reportViewer.generateProtransReportFromBean(list, "Avvik",
              ReportEnum.DEVIATION, null, "Avvik "
                  + deviation.getDeviationId() + "_"
                  + Util.getCurrentDateAsDateTimeString()
                  + ".pdf");
          window.pack();
          window.setSize(new Dimension(850, 700));
          Util.locateOnScreenCenter(window);
View Full Code Here

      selectedIndex = table.convertRowIndexToModel(selectedIndex);
    } else {
      selectedIndex = -1;
    }
    if (selectedIndex != -1) {
      Deviation object = (Deviation) objectSelectionList
          .getElementAt(selectedIndex);
      CheckObject checkObject = checkDeleteObject(object);
      if (checkObject != null) {
        String msg = checkObject.getMsg();
        if (msg == null) {
View Full Code Here

  /**
   * @see no.ugland.utransprod.gui.handlers.AbstractViewHandler#getNewObject()
   */
  @Override
  public Deviation getNewObject() {
    return new Deviation();
  }
View Full Code Here

  public boolean saveObjectExt(
      AbstractModel<Deviation, DeviationModel> object,
      WindowInterface currentWindow) {
    object.viewToModel();
    Deviation deviation = object.getObject();
    int index = objectList.indexOf(deviation);
    checkAndSaveDeviation((DeviationModel) object);
    addDeviationToTable(index, deviation);
    return true;
  }
View Full Code Here

    addDeviationToTable(index, deviation);
    return true;
  }

  private void checkAndSaveDeviation(DeviationModel deviationModel) {
    Deviation deviation = deviationModel.getObject();
    DeviationModel.setRegistrationAndChangeDate(deviation, login
        .getApplicationUser());

    handleDeviationCost(deviation);

    Order deviationOrder = checkAndGetDeviationOrder(deviation);

    if (deviationOrder != null) {
      handleOrderLines(deviation, deviationModel, deviationOrder);
    }
    deviation.cacheComments();
    ((DeviationManager) overviewManager).saveDeviation(deviation);
  }
View Full Code Here

   * @param order
   * @param userType
   * @param window
   */
  public void registerDeviation(Order order, WindowInterface window) {
    Deviation deviation = new Deviation();
    deviation.setOrder(order);
    openEditView(deviation, false, window);
  }
View Full Code Here

    Assembly assembly = (Assembly) getRow(rowIndex);
    String columnName = StringUtils.upperCase(getColumnName(columnIndex))
    .replaceAll(" ", "_");
   
    Order order = assembly.getOrder();
    Deviation deviation = assembly.getDeviation();

    if (order != null && order.getSent() != null
        && order.getHasMissingCollies() == null) {
      setHasMissingCollies(order, window);
    }
View Full Code Here

TOP

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

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.