chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
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
Quintiq file version 2.0
#parent: #root
Method SetEventData () id:Method_LibCal_dlgEvent_SetEventData
{
  #keys: '[131094.1.110554600]'
  Body:
  [*
    // Set the values of the controls that are related to the Event.
    // Don't rely on databinding, because this is too late for the visualization logic;
    // the values have not been taken over from the bound attributes yet when the logic needs them.
    sEvent := dhEvent.Data();
    
    edtName .Text( sEvent.Subject() );
    ddslType.Text( sEvent.Type()    );
    
    capacity := LibCal_GlobalState.RealToString( sEvent.PartialCapacity() );
    edtCapacity.Text( capacity );
    
    // Days only mode requires special treatment.
    if( LibCal_Event::USE_ONLY_DAYS() )
    {
      this.SetDaysOnlyMode();
    }
    else
    {
      dhStartTimeOfDay.Data( sEvent.StartTimeOfDay() );
      dhEndTimeOfDay  .Data( sEvent.EndTimeOfDay()   );
      
      durStartTimeOfDay.Duration( sEvent.StartTimeOfDay() );
      durEndTimeOfDay  .Duration( sEvent.EndTimeOfDay()   );
      
      ckbIsAllDay.Checked( sEvent.IsAllDay() );
    }
  *]
}