Examples of CostUnit


Examples of no.ugland.utransprod.model.CostUnit

   * @see no.ugland.utransprod.gui.model.AbstractModel#getBufferedObjectModel(com.jgoodies.binding.PresentationModel)
   */
  @Override
  public CostUnitModel getBufferedObjectModel(
      PresentationModel presentationModel) {
    CostUnitModel costUnitModel = new CostUnitModel(new CostUnit());
    costUnitModel.setCostUnitId((Integer) presentationModel
        .getBufferedValue(PROPERTY_COST_UNIT_ID));
    costUnitModel.setCostUnitName((String) presentationModel
        .getBufferedValue(PROPERTY_COST_UNIT_NAME));
    costUnitModel.setDescription((String) presentationModel
View Full Code Here

Examples of no.ugland.utransprod.model.CostUnit

  /**
   * @param costUnit
   */
  public void setCostUnit(CostUnit costUnit) {
    CostUnit oldUnit = getCostUnit();
    object.setCostUnit(costUnit);
    firePropertyChange(PROPERTY_COST_UNIT, oldUnit, costUnit);
  }
View Full Code Here

Examples of no.ugland.utransprod.model.CostUnit

  }

  @Test
  public void testSaveObject() throws Exception {
    costUnit = new CostUnit();
    costUnit.setCostUnitName("test");

    viewHandler.saveObject(new CostUnitModel(costUnit), null);
    assertEquals(1, viewHandler.getObjectSelectionListSize());
  }
View Full Code Here

Examples of no.ugland.utransprod.model.CostUnit

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

Examples of no.ugland.utransprod.model.CostUnit

     * @param rowIndex
     * @param columnIndex
     * @return verdi
     */
    public Object getValueAt(int rowIndex, int columnIndex) {
      CostUnit costUnit = (CostUnit) getRow(rowIndex);
      switch (columnIndex) {
      case 0:
        return costUnit.getCostUnitName();
      case 1:
        return costUnit.getDescription();
      default:
        throw new IllegalStateException("Unknown column");
      }

    }
View Full Code Here

Examples of no.ugland.utransprod.model.CostUnit

        .costUnitManager(costUnitManager) //
        .transportCostAdditionManager(transportCostAdditionManager)
        .build();
    CostType costType = new CostType();
    when(costTypeManager.findByName("Fraktkost")).thenReturn(costType);
    CostUnit costUnit = new CostUnit();
    when(costUnitManager.findByName("Intern")).thenReturn(costUnit);
  }
View Full Code Here

Examples of no.ugland.utransprod.model.CostUnit

  }
  @Test
  public void skal_importere_montering() throws Exception {
    CostType costType=new CostType();
    when(costTypeManager.findByName("Montering")).thenReturn(costType);
    CostUnit costUnit=new CostUnit();
    when(costUnitManager.findByName("Kunde")).thenReturn(costUnit);
   
    String orderNr="1";
    ImportOrderV importOrderV = new ImportOrderV();
    Integer userdefId=1;
View Full Code Here

Examples of no.ugland.utransprod.model.CostUnit

  private OrderCost getOrderCost(final String costTypeName,
      final CostTypeManager costTypeManager, final BigDecimal costAmount,
      final Order order, final CostUnitManager costUnitManager,
      final String costUnitName) {
    CostType costType = costTypeManager.findByName(costTypeName);
    CostUnit costUnit = costUnitManager.findByName(costUnitName);
    OrderCost orderCost = order.getOrderCost(costTypeName, costUnitName);
    orderCost = orderCost != null ? orderCost : new OrderCost();
    orderCost.setCostAmount(costAmount);
    orderCost.setCostType(costType);
    orderCost.setCostUnit(costUnit);
View Full Code Here

Examples of no.ugland.utransprod.model.CostUnit

      CostTypeManager costTypeManager = (CostTypeManager) ModelUtil
          .getBean("costTypeManager");
      CostUnitManager costUnitManager = (CostUnitManager) ModelUtil
          .getBean("costUnitManager");
      CostType costTypeDev = costTypeManager.findByName("Avvik");
      CostUnit costUnitInternal = costUnitManager.findByName("Intern");
      OrderCost defaultOrderCost = new OrderCost();
      defaultOrderCost.setCostAmount(BigDecimal.valueOf(500));
      defaultOrderCost.setCostType(costTypeDev);
      defaultOrderCost.setCostUnit(costUnitInternal);
View Full Code Here

Examples of no.ugland.utransprod.model.CostUnit

        .getBean("costUnitManager");
    List<String> defaultCosts = ApplicationParamUtil
        .getDefaultDeviationCosts();

    CostType costType;
    CostUnit costUnitInternal = costUnitManager.findByName("Intern");
    OrderCost orderCost;
    List<CostType> containsCostTypes = getCostTypes();
    for (String costName : defaultCosts) {
      costType = costTypeManager.findByName(costName);
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.