chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
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
Quintiq file version 2.0
#parent: #root
Method OnOK () id:Method_DialogCreateEditPISPNodeInRouting_OnOK
{
  #keys: '[139394.0.1327426844]'
  Body:
  [*
    // On OK
    
    // New
    data := DataHolderDialogData.Data();
    if( isnull( data.WrappedInstance() ) )
    {
      // Add input output product in stocking point as operationi input or output
      data.Operation().CreateOperationBOM( DropDownListProduct.Data(), 
                                           DropDownListStockingPoint.Data(),  
                                           data.IsInput(), 
                                           false /*isfromdb*/ );  
    }
    else
    {
      // Batch edit the nodes with different product and stocking point, so only changes the stocking point
      OperationBOM::Update( DataHolderDialogDatas.Data(), DropDownListProduct.Data(), DropDownListStockingPoint.Data() );
    }
    
    this.Close();
  *]
}