Quintiq file version 2.0
#parent: PanelActions/ButtonApply
Response OnClick () id:Response_PanelActions_ButtonApply_OnClick
{
  #keys: '[139394.1.82538980]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    sanitycheckfeedback := '';
    gp := MacroPlan.GlobalParameters_MP();
    
    return GlobalParameters_MP::GetIsBottleneckParamsDirty( feedback,
                                                             gp,
                                                             ApplicationMacroPlanner.FormatStringToReal( EditFieldLowerBottleneckThreshold.Text() ),
                                                             ApplicationMacroPlanner.FormatStringToReal( EditFieldUpperBottleneckThreshold.Text() ),
                                                             ApplicationMacroPlanner.FormatStringToReal( EditFieldStockingPointBottleneckThreshold.Text() ),
                                                             DurationSelectorBottleneckWindowStart.Duration(),
                                                             DurationSelectorBottleneckWindowEnd.Duration(),
                                                             ApplicationMacroPlanner.FormatStringToReal( EditFieldBottleneckTolerance.Text() ) )
           and GlobalParameters_MP::ValidateBottlenecktInput( feedback,
                                                             sanitycheckfeedback,
                                                             MacroPlan,
                                                             ApplicationMacroPlanner.FormatStringToReal( EditFieldBottleneckTolerance.Text() ),
                                                             DurationSelectorBottleneckWindowStart.Duration(),
                                                             DurationSelectorBottleneckWindowEnd.Duration(),
                                                             ApplicationMacroPlanner.FormatStringToReal( EditFieldLowerBottleneckThreshold.Text() ),
                                                             ApplicationMacroPlanner.FormatStringToReal( EditFieldUpperBottleneckThreshold.Text() ),
                                                             ApplicationMacroPlanner.FormatStringToReal( EditFieldStockingPointBottleneckThreshold.Text() ),
                                                             true
                                                           );
  *]
  QuillAction
  {
    Body:
    [*
      // Apply changes
      Form.OnApply();
    *]
    GroupServerCalls: false
  }
}
