Quintiq file version 2.0
#parent: pnlActions/btnOk
Response OnClick () id:Response_pnlActions_btnOk_OnClick
{
  #keys: '[412672.0.1039310295]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      if( cbAllProduct.Checked() ){
        traverse( MacroPlan,Product_MP,product ){
          traverse( product,ProductInStockingPoint_MP,productInStockingPoint ){
            LockPeriod::Create( productInStockingPoint,dsLockDate.Date() );
          }
        }
      }else{
        if( cbAllProductInStockingPoint.Checked() ){
          product := ddlProduct.Data();
          traverse( product,ProductInStockingPoint_MP,productInStockingPoint ){
            LockPeriod::Create( productInStockingPoint,dsLockDate.Date() );
          }
        }else{
          LockPeriod::Create( ddlProductInStockingPoint.Data(),dsLockDate.Date() );
        } 
      }
      Form.Close();
    *]
  }
}
