xiaoding721
2023-11-13 e4edcfd0b987b239526f5375881b919789782dad
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Quintiq file version 2.0
#parent: #root
Method Edit (
  internal[GUIComponent] parent,
  ScenarioManager owner
) id:Method_DialogEditScenarioComparisonViews_Edit
{
  #keys: '[110880.7.620637933]'
  Body:
  [*
    // Edit sanity check group
    
    traverse( owner, ScenarioComparisonView, sc )
    {
      if( sc.Name() = ScenarioComparisonView::GetSDName() )
      {
        SelectionSD.BoundValue( sc.View() );
      }
    
      else if( sc.Name() = ScenarioComparisonView::GetUPName() )
      {
        SelectionUP.BoundValue( sc.View() );
      }  
    
      else if( sc.Name() = ScenarioComparisonView::GetPISPIPName() )
      {
        SelectionPISPIP.BoundValue( sc.View() );
      }  
    
      else if( sc.Name() = ScenarioComparisonView::GetNSName() )
      {
        SelectionNS.BoundValue( sc.View() );
      }  
    
      else if( sc.Name() = ScenarioComparisonView::GetTripName() )
      {
        SelectionTrip.BoundValue( sc.View() );
      }  
    
      else if( sc.Name() = ScenarioComparisonView::GetCostName() )
      {
        SelectionCost.BoundValue( sc.View() );
      }  
    
    }
    
    result := this.DoModal( parent );
    
    if( result > 0 )
    {          
      // when adding new pre-configured comparison views in the future, just extend this list with new pairs.
      nameandviews := ScenarioComparisonView::GetSDName() + ':' + SelectionSD.BoundValue() + ';'
                      + ScenarioComparisonView::GetUPName() + ':' + SelectionUP.BoundValue() + ';'
                      + ScenarioComparisonView::GetPISPIPName() + ':' + SelectionPISPIP.BoundValue() + ';'
                      + ScenarioComparisonView::GetNSName() + ':' + SelectionNS.BoundValue() + ';'
                      + ScenarioComparisonView::GetTripName() + ':' + SelectionTrip.BoundValue() + ';'
                      + ScenarioComparisonView::GetCostName() + ':' + SelectionCost.BoundValue() + ';';
      
      
      ScenarioComparisonView::Update( owner, nameandviews );  
    }
  *]
}