yanweiyuan3
2023-08-09 fd693f0faf305ec98d7ea03e09fe6787817e71d7
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
37
38
39
40
41
42
43
44
45
Quintiq file version 2.0
#parent: #root
Method HideStockingPointFromClient (
  Boolean isshide
) id:Method_FormSupplyChainOverview_HideStockingPointFromClient
{
  #keys: '[136682.0.1953991244]'
  Body:
  [*
    //This method will manually hide the node from client when user click to hide without waiting the status to be updated in server, just need to filter current children of current focus data
    
    nodes := DataHolderNode.Data();
    current := selectset( DataHolderFocusedUnit.Data(), StockingPoint_MP.StockingPointNode, c, true, c.SupplyChainView()= DataHolderSupplyChainView.Data() );
    
    if ( isshide )
    {
      nodes := nodes.Difference( current );
    }
    else
    {
     nodes := nodes.Union( current );
     
     if ( nodes.Size() =0 )
     {
       nodes := current.Copy();  
     }
    }
    
    DataHolderNode.Data( &nodes );
    nodes := DataHolderNode.Data();
    
    
    edges := construct( StockingPointUnitEdges );
    if ( not ( isshide ) )
    { 
      //StockingpointEdge
      inputedge := selectset( nodes, Elements.InputStockingPointUnitEdge, edge, true, true );
      outputedge := selectset(  nodes, Elements.OutputStockingPointUnitEdge,edge, true, true );
      edges := inputedge.Union( outputedge );
    }                 
    DataHolderStockingPointUnitEdge.Data( &edges );
    
    Form.FilterLanelegs();
  *]
}