Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method OnOK () id:Method_DialogCreateEditPostponementPenalty_OnOK 
 | 
{ 
 | 
  #keys: '[139394.0.1870666921]' 
 | 
  Body: 
 | 
  [* 
 | 
    // On ok 
 | 
    this.ApplyChanges(); 
 | 
     
 | 
    data := DataHolderDialogData.Data(); 
 | 
     
 | 
    // New 
 | 
    if( isnull( data.WrappedInstance() ) ) 
 | 
    { 
 | 
      PostponedSalesDemandCost::Create( DropDownListProduct.Data(), 
 | 
                                        DropDownListStockingPoint.Data(), 
 | 
                                        DateSelectorStart.Date(), 
 | 
                                        data.Penalty(), 
 | 
                                        false /*isfromdb*/ ); 
 | 
    } 
 | 
    else 
 | 
    { 
 | 
      PostponedSalesDemandCost::Update( DataHolderDialogDatas.Data(), 
 | 
                                        DropDownListProduct.Data(), 
 | 
                                        DropDownListStockingPoint.Data(), 
 | 
                                        DateSelectorStart.Date(),  
 | 
                                        data.Penalty() ); 
 | 
    } 
 | 
     
 | 
    this.Close(); 
 | 
  *] 
 | 
} 
 |