Quintiq file version 2.0
#parent: Toolbar/btnOk
Response OnClick () id:Response_Toolbar_btnOk_OnClick
{
  #keys: '[113694.0.1622027195]'
  Body:
  [*
    // Apply data
    Dialog.ApplyChanges();
    Dialog.EndModal(1);
  *]
  DefinitionID: 'Responsedef_GUIButtonBase_OnClick'
  Precondition:
  [*
    sanitycheckfeedback := '';
    return ProductInTrip::ValidateInput( feedback,
                                         Dialog.Data().Trip(),
                                         SelectionProduct.Data(),
                                         ApplicationLibMacroPlanner.FormatStringToReal( EditorQuantity.Text() ),
                                         sanitycheckfeedback )
           and ( not isnull( Dialog.Data().WrappedInstance() )  // If new, check if the product has already been assigned
                 or ProductInTrip::CanCreate( Dialog.Data().Trip(), SelectionProduct.Data(), feedback ) );
  *]
}
