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
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  StaticMethod MenuNew ( 
 |    LibUTF_IterationRun run, 
 |    MacroPlan macroplan, 
 |    NamedValueTree nvt_transitiontype 
 |  ) 
 |  { 
 |    TextBody: 
 |    [* 
 |      dto := DTO_TransitionType::ConstructNew( run, nvt_transitiontype ); 
 |      unit := macroplan.FindUnit( dto.UnitID() ); 
 |      fromcampaigntype := select( unit, CampaignType_MP, from, from.Name() = dto.FromCampaignTypeName() ); 
 |      tocampaigntype := select ( unit, CampaignType_MP, to, to.Name() = dto.ToCampaignTypeName() );  
 |       
 |      TransitionType_MP::Create( unit,  
 |                                 dto.DefaultMinQuantity(), 
 |                                 dto.DefaultMaxQuantity(), 
 |                                 dto.DefaultMinDuration(), 
 |                                 dto.DefaultMaxDuration(), 
 |                                 fromcampaigntype, 
 |                                 tocampaigntype, 
 |                                 dto.HasInputMaxQuantity(), 
 |                                 dto.HasInputMaxDuration(),  
 |                                 false ); 
 |    *] 
 |    InterfaceProperties { Accessibility: 'Module' } 
 |  } 
 |  
  |