Quintiq file version 2.0
#parent: Toolbar/ButtonOk
Response OnClick () id:Response_Toolbar_ButtonOk_OnClick
{
  #keys: '[11660.0.62385711]'
  Body:
  [*
    // Apply changes
    Dialog.ApplyChanges();
    Dialog.SetAttributesAfterOnApplyData();
    Dialog.EndModal(1);
  *]
  DefinitionID: 'Responsedef_GUIButtonBase_OnClick'
  Precondition:
  [*
    sanitycheckfeedback := '';
    return not isnull( Dialog.Data() )  //the only time Dialog.Data null check is required is when this dlg is opened for view initialization. 
           and Operation::ValidateInput( feedback,
                                         sanitycheckfeedback,
                                         MacroPlan,
                                         SelectionUnit.Data(),
                                         EditorID.Text(),
                                         EditorID.Text(),
                                         ApplicationLibMacroPlanner.FormatStringToReal( EditorThroughput.Text() ),
                                         CheckBoxHasUserLotSize.Checked(),
                                         ApplicationLibMacroPlanner.FormatStringToReal( EditorUserMinimumQuantity.Text() ),
                                         CheckBoxHasUserMaximumQuantity.Checked(),
                                         ApplicationLibMacroPlanner.FormatStringToReal( EditorUserMaximumQuantity.Text() ),
                                         ApplicationLibMacroPlanner.FormatStringToReal( EditorUserLotSize.Text() ),
                                         ApplicationLibMacroPlanner.FormatStringToReal( EditorCO2Emission.Text() ),
                                         Dialog.Data().WrappedInstance(),
                                         true );
  *]
}
