yypsybs
2023-10-10 550ebcf02217f8a0c6fe9001fcfa8e42e9cd6b83
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
Quintiq file version 2.0
#parent: #root
Method HideNodeFromClient () id:Method_FormSupplyChainOverview_HideNodeFromClient
{
  #keys: '[136682.0.1908324168]'
  Body:
  [*
    //This method will manually hide the node from client when user click to hide without waiting the status to be updated in server
    nodes := DataHolderSelectedNode.Data();
    different := DataHolderNode.Data().Difference( nodes );
    DataHolderNode.Data( &different );
    
    //StockingpointEdge
    inputedge := selectset( nodes, Elements.InputStockingPointUnitEdge, edge, true, true );
    outputedge := selectset(  nodes, Elements.OutputStockingPointUnitEdge,edge, true, true );
    edges := inputedge.Union( outputedge );
    edgesdiff := DataHolderStockingPointUnitEdge.Data().Difference( edges );
    DataHolderStockingPointUnitEdge.Data( &edgesdiff );
    
    //Laneg edges (Stockingpointnode)
    stockingpointnods := selectset(  nodes, Elements.astype( StockingPointNode ), s, true, true );
    inputlaneleges := selectset(  stockingpointnods, Elements.AsDestinationStockingPoint, origin, true, true );
    outputlaneleges := selectset(  stockingpointnods, Elements.AsOriginStockingPoint, dest, true, true );
    stockingedge := inputlaneleges.Union( outputlaneleges );
    
    //Laneg edges (Unitnode)
    unitnodes := selectset(  nodes, Elements.astype( UnitNode ), s, true, true );
    unitdest := selectset(  unitnodes, Elements.AsDestinationUnit, origin, true, true );
    unitorigin := selectset( unitnodes, Elements.AsOriginUnit, dest, true, true );
    unitedge := unitorigin.Union( unitdest );
    
    nodelanelegeedges := stockingedge.Union( unitedge );
    
    newlanes := DataHolderLaneLegEdge.Data().Difference( nodelanelegeedges );
    DataHolderLaneLegEdge.Data( &newlanes );
  *]
}