xiaoding721
2023-11-13 e4edcfd0b987b239526f5375881b919789782dad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Quintiq file version 2.0
#parent: CustomDrawComponent/CustomDrawDataLayerNode
Response OnDrop (
  structured[StockingPointNode] source,
  UnitNode droptarget
) id:Response_CustomDrawComponent_CustomDrawDataLayerNode_OnDrop_259
{
  #keys: '[110994.0.667421394]'
  Body:
  [*
    // Drop stocking point nodes to unit node to create link
    
    feedback := '';
    sources := selectset( source, Elements.StockingPoint_MP, sp, true, true );
    
    if ( droptarget.Unit().CanLinkToStockingPoints( feedback, sources, true ) )
    {
      droptarget.Unit().LinkToStockingPoints( sources, true );
    }
    else
    {
      droptarget.Unit().RemoveAsInputToStockingPoints( sources );
    }
  *]
  DefinitionID: 'Responsedef_CustomDrawDataLayer_OnDrop'
  UserRequiresReadWrite: true
}