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() );
    }
  *]
}
