Exemple #1
0
            ///
            ///		 * <param name="bag">
            ///		 * @return </param>
            ///
            public virtual JDFResourceLink updateNodeLink(AmountBag bag)
            {
                JDFResourceLink nodeLink = enclosingInstance.m_Node.getLink(0, null, new JDFAttributeMap(AttributeName.RREF, rl.getrRef()), null);

                if (bag != null)
                {
                    VJDFAttributeMap vMap = new VJDFAttributeMap(enclosingInstance.m_vPartMap);
                    if (vMap.Count == 0)
                    {
                        vMap.Add(new JDFAttributeMap());
                    }
                    if (nodeLink != null)
                    {
                        if (bTrackWaste)
                        {
                            vMap.put(EnumPartIDKey.Condition, "Good");
                            nodeLink.setAmountPoolAttribute(AttributeName.ACTUALAMOUNT, StringUtil.formatDouble(bag.totalAmount), null, vMap);
                            vMap.put(EnumPartIDKey.Condition, "Waste");
                            nodeLink.setAmountPoolAttribute(AttributeName.ACTUALAMOUNT, StringUtil.formatDouble(bag.totalWaste), null, vMap);
                        }
                        else
                        {
                            nodeLink.setAmountPoolAttribute(AttributeName.ACTUALAMOUNT, StringUtil.formatDouble(bag.totalAmount + bag.totalWaste), null, vMap);
                        }
                    }
                }
                return(nodeLink);
            }
Exemple #2
0
 ///
 ///		 <summary> * @return </summary>
 ///
 public virtual JDFResourceLink getPhaseTimeLink(AmountBag bag)
 {
     cleanAmounts();
     if (bag != null)
     {
         VJDFAttributeMap vMap = new VJDFAttributeMap(enclosingInstance.m_vPartMap);
         if (vMap.Count == 0)
         {
             vMap.Add(new JDFAttributeMap());
         }
         if (bTrackWaste)
         {
             vMap.put(EnumPartIDKey.Condition, "Good");
             if (bag.phaseAmount != 0)
             {
                 rl.setAmountPoolAttribute(AttributeName.ACTUALAMOUNT, StringUtil.formatDouble(bag.phaseAmount), null, vMap);
             }
             if (startAmount != 0)
             {
                 rl.setAmountPoolAttribute(AttributeName.AMOUNT, StringUtil.formatDouble(startAmount), null, vMap);
             }
             vMap.put(EnumPartIDKey.Condition, "Waste");
             if (bag.phaseWaste != 0)
             {
                 rl.setAmountPoolAttribute(AttributeName.ACTUALAMOUNT, StringUtil.formatDouble(bag.phaseWaste), null, vMap);
             }
             if (startWaste != 0)
             {
                 rl.setAmountPoolAttribute(AttributeName.AMOUNT, StringUtil.formatDouble(startWaste), null, vMap);
             }
         }
         else
         {
             if (bag.phaseAmount + bag.phaseWaste != 0)
             {
                 rl.setAmountPoolAttribute(AttributeName.ACTUALAMOUNT, StringUtil.formatDouble(bag.phaseAmount + bag.phaseWaste), null, vMap);
             }
             if (startAmount + startWaste != 0)
             {
                 rl.setAmountPoolAttribute(AttributeName.AMOUNT, StringUtil.formatDouble(startAmount + startWaste), null, vMap);
             }
         }
     }
     return(rl);
 }