haorenhui
2023-10-30 6d6cc10d9e8e242661da7fd655dec155a09d676c
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
28
29
30
31
32
33
34
35
36
Quintiq file version 2.0
#parent: ListEntityTreeInPanel
Response OnUserSelectionChanged (
  structured[Entity] selection
) id:Response_ListEntityTreeInPanel_OnUserSelectionChanged_607
{
  #keys: '[127710.1.1014109807]'
  Body:
  [*
    // Highligh response for entities
    
    // turn on persistant filtering
    ApplicationLibMacroPlanner.SetPersistantFilter( true );
    
    nodes := selectset( MacroPlan,
                        ViewBase.Node,
                        n,
                        n.istype( UnitNode ) or n.istype( StockingPointNode ),
                        exists( selection, Elements, e, e.DisplayName() = n.Name(), true )
                      );
    ApplicationLibMacroPlanner.SupplyChainDiagramHighlightedObject( nodes );
    
    
    // Set detail panel for some filtering
    sps := selectset( selection, Elements.astype( StockingPoint_MP ), sp, true, true );
    units :=  selectset( selection, Elements.astype( Unit ), u, true, true );
    
    DataHolderStockingPoints.Data( sps.Copy() );
    DataHolderUnits.Data( units.Copy() );
    
    // Automatically expand the first level on the capacity planning gantt chart
    DataHolderShowChildOfUnit.Data( units.Copy() );
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_List_OnUserSelectionChanged'
}