Quintiq file version 2.0
#parent: Toolbar/btnOk
Response OnClick () id:Response_Toolbar_btnOk_OnClick
{
  #keys: '[11660.0.1943434684]'
  Body:
  [*
    // Apply changes
    Dialog.ApplyChanges();
    Dialog.SetAttributesAfterOnApplyData();
    Dialog.EndModal(1);
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_GUIButtonBase_OnClick'
  Precondition:
  [*
    sanitycheckfeedback := '';
    return GlobalParameters_MP::ValidateInput( feedback,
                                               sanitycheckfeedback,
                                               MacroPlan,
                                               SelectionDefaultShiftPattern.Data(),
                                               Dialog.Data().DisaggregationRatio(),
                                               ApplicationLibMacroPlanner.FormatStringToNumber( EditorNrOfDecimal.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorBalanceTolerance.Text() ),
                                               Dialog.Data().LotSizeTolerance(),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorBottleneckTolerance.Text() ),
                                               GUIDurationSelectorBottleneckWindowStart.Duration(),
                                               GUIDurationSelectorBottleneckWindowEnd.Duration(),
                                               GUIDateTimeSelectorStartOfKPIHorizon.DateTime().Date(),
                                               GUIDateTimeSelectorEndOfKPIHorizon.DateTime().Date(),
                                               SelectionDefaulSmartPlanStrategy.BoundValue(),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorLowerBottleneckThreshold.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorUpperBottleneckThreshold.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToNumber( EditorSanityCheckLimit.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorAbsoluteUpperLimit.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorAbsoluteLowerLimit.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorDefaultAllocation.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorDefaultUtilization.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorDefaultMinCapacityForUnit.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorDefaultMaxCapacityForUnit.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorDefaultMaxLoadPercentage.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorDefaultMaxCapacityForStockingPoint.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorDefaultOperationInputOutputQuantity.Text() ),
                                               CheckBoxHasDefaultInventoryHolding.Checked(),
                                               StringSelectionAccountForInventoryHolding.BoundValue(),
                                               RadioButtonGroupHasAbsoluteValueForInventoryHolding.BoundValue() = 'true',
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorDefaultAbsoluteCostForInventoryHolding.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorDefaultAnnualInterestRateForInventoryHolding.Text() ),
                                               StringSelectionPeriodSpecification.Text(),
                                               Dialog.Data().DefaultNumberOfPeriodsForAvgDemand(),
                                               ApplicationLibMacroPlanner.FormatStringToReal( EditorNoiseThresholdOptimizerOutput.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToNumber( EditorNumberOfPeriodsSmartPlan.Text() ),
                                               CheckBoxIsSlidingWindowsApproach.Checked(),
                                               ApplicationLibMacroPlanner.FormatStringToNumber( EditorNumberOfPeriodsInWindow.Text() ),
                                               ApplicationLibMacroPlanner.FormatStringToNumber( EditorNumberOfPeriodsPerSlide.Text() ),
                                               Dialog.Data().DefaultServiceLevel(),
                                               ApplicationLibMacroPlanner.FormatStringToReal(EditorBottleneckThreshold.Text() )
                                               
                                               );
  *]
  UserRequiresReadWrite: true
}
