yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
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
Method NewTrip (
  internal[GUIComponent] parent
) as Trip id:Method_DialogCreateEditTrip_NewTrip
{
  #keys: '[113694.0.1559949932]'
  Body:
  [*
    // New trip without pispip
    
    data := construct( shadow [Trip], ID := "" ); // Temporary set ID to empty, will be set in Create method
    
    Dialog.Data( data );
    Dialog.SetDefaultValue();
    
    result := this.DoModal( parent );
    trip := null( Trip );
    
    if( result > 0 )
    {
      trip := Trip::Create( data.LaneLeg(),
                            data.Arrival() );
    }
    
    return trip;
  *]
}