Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method RefreshFromToDateTimes () id:Method_FormKpiQueryTrack_RefreshFromToDateTimes 
 | 
{ 
 | 
  #keys: '[146874.0.1482367888]' 
 | 
  Body: 
 | 
  [* 
 | 
    // Updates the From-To datetime pickers based on the selection 
 | 
    // in the radio button group. 
 | 
     
 | 
    option := DataHolderTimespan.Data(); 
 | 
     
 | 
    if ( option = "lastweek" ) 
 | 
    { 
 | 
      DataHolderDateTimeFrom.Data( DateTime::Now() - Duration::Weeks( 1 ) ); 
 | 
      DataHolderDateTimeTo.Data( DateTime::Now() ); 
 | 
    } 
 | 
    else if ( option = "lastmonth" ) 
 | 
    { 
 | 
      DataHolderDateTimeFrom.Data( GlobalStateKpiTracker.GetLastMonth( DateTime::Now() ) ); 
 | 
      DataHolderDateTimeTo.Data( DateTime::Now() ); 
 | 
    } 
 | 
  *] 
 | 
} 
 |