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
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method CopyStrategy ( 
 |    Strategy selection, 
 |    internal[GUIComponent] parent, 
 |    Boolean copyfromdialog 
 |  ) as Strategy id:Method_ScenarioManager_DialogCreateEditStrategy_CopyStrategy 
 |  { 
 |    #keys: '[112884.0.704997307]' 
 |    Body: 
 |    [* 
 |      // Copy strategy 
 |      // There will 2 transactions for copying for maintenance purpose, because there is quite some logic involved during creation of Strategy in the Editor. 
 |      strategy := selection.Copy( ScenarioManager, 
 |                                  selection, 
 |                                  Strategy::GetUniqueStrategyName( selection.Name(), ScenarioManager ), 
 |                                  selection.DisplayIndex(), 
 |                                  selection.Description(), 
 |                                  selection.IsVisible() ); 
 |       
 |      // Copy strategy from the dialog. 
 |      if( copyfromdialog ) 
 |      { 
 |        SelectionStrategy.Data( strategy ); 
 |      } 
 |      else 
 |      { 
 |        Dialog.EditStrategy( strategy, parent ); 
 |      } 
 |       
 |      return strategy; 
 |    *] 
 |  } 
 |  
  |