Quintiq file version 2.0
#parent: pnlActions/btnOK
Response OnClick () id:Response_pnlActions_btnOK_OnClick
{
  #keys: '[134266.1.1914616865]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    sanitycheckfeedback := '';
    data := DataHolderDialogData.Data();
    return not isnull( data ) 
           and Campaign_MP::CanEdit( feedback, MacroPlan, data.WrappedInstance() ) 
           and Campaign_MP::ValidateInput( feedback,
                                           sanitycheckfeedback,
                                           MacroPlan,
                                           selCampaignType_MP.Data(),
                                           data.WrappedInstance(),
                                           dsEarliestStart.DateTime(),
                                           Duration::Zero(), // derived duration will be recalculate in static method
                                           RadioButtonGroupQuantityDuration.BoundValue(),
                                           ApplicationMacroPlanner.FormatStringToReal( EditorCampaignMinQuantity.Text() ),
                                           ApplicationMacroPlanner.FormatStringToReal( EditorCampaignMaxQuantity.Text() ),
                                           DurationSelectorMinDuration.Duration(),
                                           DurationSelectorMaxDuration.Duration(),
                                           edtComment.Text(),   
                                           true,
                                           EditorCampaignMaxQuantity.Enabled() and RadioButtonGroupQuantityDuration.BoundValue() = GlobalParameters_MP::GetCampaignTransitionsTypeQuantity(),
                                           DurationSelectorMaxDuration.Enabled() and RadioButtonGroupQuantityDuration.BoundValue() = GlobalParameters_MP::GetCampaignTransitionsTypeDuration(),
                                           not CheckBoxIsCreateAndResequence.Checked() );
  *]
  QuillAction
  {
    Body:
    [*
      Form.OnOk();
    *]
    GroupServerCalls: false
  }
}
