Quintiq file version 2.0
#parent: PanelDispatchShiftSchedulingInformation/bDispatch
Response OnClick () id:Response_PanelDispatchShiftSchedulingInformation_bDispatch_OnClick
{
  #keys: '[414996.1.172931481]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return cbCC.Checked() or cbDL.Checked();
  *]
  QuillAction
  {
    Body:
    [*
      factoryNameChinese := "";
      factoryNameEnglish := "";
      if( cbCC.Checked() ){
        factoryNameChinese := factoryNameChinese.Concat( "长春工厂;" );
        factoryNameEnglish := factoryNameEnglish.Concat( "CC;" );
      }
      if( cbDL.Checked() ){
        factoryNameChinese := factoryNameChinese.Concat( "大连工厂;" );
        factoryNameEnglish := factoryNameEnglish.Concat( "DL;" );
      }
      if( WebMessageBox::Question( Translations::RecycleBin_DispatchShiftSchedulingDispatchCheck( factoryNameChinese,factoryNameEnglish ),Translations::MessageBox_YesNo() ) = 0 ){
        if( cbCC.Checked() ){
          message := DispatchShiftSchedulingLine::DispatchCC( RecycleBin );
          WebMessageBox::Information( message );
        }
        if( cbDL.Checked() ){
          message := DispatchShiftSchedulingLine::DispatchDL( RecycleBin ); 
          WebMessageBox::Information( message );
        }
      }
      WebMessageBox::Success( "下发成功" );
    *]
    GroupServerCalls: false
  }
}
