hongji.li
2023-11-07 1a1ba3ad5ed9e4380185aa1ccad20204a0e5f115
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
Quintiq file version 2.0
#parent: #root
Method Edit (
  internal[GUIComponent] parent,
  structured[PISPNodeInRouting] selection
) id:Method_DialogCreateEditPISPNodeInRouting_Edit
{
  #keys: '[124808.1.33987999]'
  Body:
  [*
    // Add stocking point from existing PISP linked to operation output
    
    // Set components for validate input
    Dialog.EnableDisableComponents( selection.Size() > 1 );
    
    firstselection := selection.Element( 0 );
    
    operation:= guard( firstselection.OperationInputForRCV().Operation(),
                       firstselection.OperationOutputForRCV().Operation() );
    isinput := isnull( firstselection.OperationOutputForRCV() );
    
    Dialog.SetComponentsForValidateInput( operation, isinput );
    
    Dialog.Data( firstselection );
    
    result := this.DoModal( parent );
    
    if( result > 0 )
    {
      if( selection.Size() = 1 )
      {
        firstselection.Update( SelectionProduct.Data(), SelectionStockingPoint.Data() );
      }
      else
      {
        PISPNodeInRouting::Update( selection, SelectionStockingPoint.Data() );
      }
    }
  *]
}