lazhen
2025-01-09 8afe90b633046db39042aada36b88193062f8cff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Quintiq file version 2.0
#parent: Toolbar/ButtonOk
Response OnClick () id:Response_Toolbar_ButtonOk_OnClick
{
  #keys: '[11660.0.16637272]'
  Body:
  [*
    // Submit data and show warning if uom ahd been change.
    // ---------------------- Quick fix ------------------------
    // Please remove after the proper fix #16515
    // The method in designer should be updated, setting relations/attribute will only done in one place.
    Dialog.Data().SynchronizeUnitPeriod( RadioButtonGroupCapacityType.BoundValue() <> Dialog.Data().CapacityType() );
    // -------------------------------------------------------------------
    Dialog.ApplyChanges();
    Dialog.SetAttributeAfterApplyData();
    Dialog.EndModal(1);
  *]
  DefinitionID: 'Responsedef_GUIButtonBase_OnClick'
  Precondition:
  [*
    sanitycheckfeedback := '';
    return Unit::ValidateInput( feedback,
                                sanitycheckfeedback,
                                MacroPlan,
                                EditorID.Text(),
                                EditorName.Text(),
                                guard( DialogCreateEditUnit.Data().WrappedInstance(), null( Unit ) ),
                                SelectionParent.Data(),
                                CheckBoxHasStart.Checked(),
                                GUIDateTimeSelectorStart.DateTime().Date(),
                                CheckBoxHasEnd.Checked(),
                                GUIDateTimeSelectorEnd.DateTime().Date(),
                                RadioButtonGroupCapacityType.BoundValue(),
                                SelectionUnitOfMeasurement.Data(),
                                SelectionCurrency.Data(),
                                Dialog.Data().MinimumQuantity(),
                                CheckBoxMaximumQuantity.Checked(),
                                ApplicationLibMacroPlanner.FormatStringToReal( EditorMaximumQuantity.Text() ),
                                Dialog.Data().LotSize(),
                                CheckBoxHasCapacitySmoothing.Checked(),
                                [Boolean] RadioButtonGroupIsSmoothCapacityOverAllPeriods.BoundValue(),
                                ApplicationLibMacroPlanner.FormatStringToNumber( EditorCapacitySmoothingLength.Text() ),
                                ApplicationLibMacroPlanner.FormatStringToReal( EditorCapacitySmoothingPercentageDelta.Text() ),
                                true );
  *]
}