Quintiq file version 2.0
#parent: Toolbar/btnOk
Response OnClick () id:Response_Toolbar_btnOk_OnClick
{
  #keys: '[110880.4.851634642]'
  Body:
  [*
    // Apply changes
    Dialog.ApplyChanges();
    Dialog.EndModal(1);
  *]
  DefinitionID: 'Responsedef_GUIButtonBase_OnClick'
  Precondition:
  [*
    sanitycheckfeedback := '';
    return Campaign_MP::CanEdit( feedback, MacroPlan, Dialog.Data().WrappedInstance() ) 
           and Campaign_MP::ValidateInput( feedback,
                                           sanitycheckfeedback,
                                           MacroPlan,
                                           SelectionCampaignType.Data(),
                                           Dialog.Data().WrappedInstance(),
                                           GUIDateTimeSelectorEarliestStart.DateTime(),
                                           Dialog.Data().Duration(),  
                                           RadioButtonGroupQuantityDuration.BoundValue(),
                                           ApplicationLibMacroPlanner.FormatStringToReal( EditorCampaignMinQuantity.Text() ),
                                           ApplicationLibMacroPlanner.FormatStringToReal( EditorCampaignMaxQuantity.Text() ),
                                           GUIDurationSelectorMinDuration.Duration(),
                                           GUIDurationSelectorMaxDuration.Duration(),
                                           EditorCampaignComment.Text(),    
                                           true,
                                           CheckBoxHasInputMaxQuantity.Checked() and RadioButtonGroupQuantityDuration.BoundValue() = GlobalParameters_MP::GetCampaignTransitionsTypeQuantity(),
                                           CheckBoxHasInputMaxDuration.Checked() and RadioButtonGroupQuantityDuration.BoundValue() = GlobalParameters_MP::GetCampaignTransitionsTypeDuration(),
                                           ValueHolderCampaignAddToLast.Data() );
  *]
}
