Lai,Risheng
2023-11-02 30c02e0c981b16be0918483543f4b812956c45d4
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
Quintiq file version 2.0
#parent: #root
Method OnUserUpdateUI () id:Method_DialogCreateEditLane_OnUserUpdateUI
{
  #keys: '[139394.0.1567339276]'
  Body:
  [*
    // User toggle has start has end
    // Update UI
    
    // Has start
    dateTime := DateSelectorStart.Date();
    if( CheckBoxHasStart.Checked() )
    {
      DateSelectorStart.Date( ifexpr( dateTime.IsFinite(), dateTime, MacroPlan.Start().Date() ) );
      DateSelectorStart.Enabled( true, '' )
    }
    else
    {
      DateSelectorStart.Date( Date::MinDate() );
      DateSelectorStart.Enabled( false, '' )
    }
    
    // Has end
    dateTime := DateSelectorEnd.Date();
    if( CheckBoxHasEnd.Checked() )
    {
      DateSelectorEnd.Date( ifexpr( dateTime.IsFinite(), dateTime, MacroPlan.End().Date() ) );
      DateSelectorEnd.Enabled( true, '' )
    }
    else
    {
      DateSelectorEnd.Date( Date::MaxDate() );
      DateSelectorEnd.Enabled( false, '' )
    }
  *]
}