chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
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
Quintiq file version 2.0
#parent: #root
Method Edit (
  internal[GUIComponent] parent,
  structured[Strategy] selection
) id:Method_ScenarioManager_DialogEditStrategyScalingFactors_Edit
{
  #keys: '[127472.0.79904391]'
  Body:
  [*
    isbatchedit := selection.Size() > 1;
    Dialog.ShowHideComponents( isbatchedit );
    
    data := shadow( selection.Element( 0 ) );
    Dialog.Data( data );
    
    result := this.DoModal( parent );
    
    if( result > 0 )
    {
      Strategy::Update( selection,
                        not isbatchedit or CheckBoxBatchEditMassScalingFactor.Checked(),
                        data.MassScalingFactor(),
                        not isbatchedit or CheckBoxBatchEditMonetaryScalingFactor.Checked(),
                        data.MonetaryScalingFactor(),
                        not isbatchedit or CheckBoxBatchEditTimeScalingFactor.Checked(),
                        data.TimeScalingFactor(),
                        not isbatchedit or CheckBoxBatchEditTimeAccountScalingFactor.Checked(),
                        data.TimeAccountScalingFactor(),
                        not isbatchedit or CheckBoxBatchEditInventoryHoldingScalingFactor.Checked(),
                        data.InventoryHoldingScalingFactor(),     
                        not isbatchedit or CheckBoxBatchEditLastAutoScalingRun.Checked(),
                        data.LastAutoScalingRun() );
    }
  *]
}