| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateLaneleg ( |
| | | MacroPlan mp, |
| | | Lane lane, |
| | | String laneid, |
| | | String originstockingpointid, |
| | |
| | | isfromdb := true; |
| | | |
| | | //create new stockingpoint |
| | | originstockingpoint := StockingPoint_MP::FindStockingPointTypeIndex( originstockingpointid ); |
| | | originstockingpoint := StockingPoint_MP::FindById( mp, originstockingpointid ); |
| | | lane.AddStockingPoint( originstockingpoint, true, isfromdb ); |
| | | Transaction::Transaction().Propagate(); |
| | | |
| | | destinationstockingpoint := StockingPoint_MP::FindStockingPointTypeIndex( destinationstockingpointid ); |
| | | destinationstockingpoint := StockingPoint_MP::FindById( mp, destinationstockingpointid ); |
| | | lane.AddStockingPoint( destinationstockingpoint, false, isfromdb ); |
| | | |
| | | Transaction::Transaction().Propagate(); |
| | | |
| | | result := LaneLeg::FindLaneLegTypeIndex( laneid, originstockingpointid, destinationstockingpointid ); |
| | | result := LaneLeg::FindByIdAndLane( lane, originstockingpointid, destinationstockingpointid ); |
| | | |
| | | if( isnull( result ) ) |
| | | { |