Quintiq file version 2.0
#parent: PanelActualDailyProduction/bReSync
Response OnClick () id:Response_PanelActualDailyProduction_bReSync_OnClick
{
  #keys: '[414996.1.185702537]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  Precondition:
  [*
    return dsEndDate.Date() > dsStartDate.Date();
  *]
  QuillAction
  {
    Body:
    [*
      days := dsEndDate.Date() - dsStartDate.Date();
      if( days >= 365 ){
        if( WebMessageBox::Question( "当前时间跨度【"+ [String]days +"天】过大，是否继续？",Translations::MessageBox_YesNo() ) = 0 ){
          ActualDailyProductionData::Synchronize( InterfaceDataset,"User",dsStartDate.Date(),dsEndDate.Date() ); 
        }else{
          WebMessageBox::Information( "Canceled." ); 
        }
      }else{
        ActualDailyProductionData::Synchronize( InterfaceDataset,"User",dsStartDate.Date(),dsEndDate.Date() );
      }
    *]
  }
}
