Quintiq file version 2.0
#parent: PanelWeekly_791/bApply
Response OnClick () id:Response_PanelWeekly996_bApply_OnClick
{
  #keys: '[414996.1.127910498]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      weekdays := construct( Numbers );
      if( cbMonday.Checked() ){
        weekdays.Add( 1 ); 
      }
      if( cbTuesday.Checked() ){
        weekdays.Add( 2 ); 
      }
      if( cbWednesday.Checked() ){
        weekdays.Add( 3 ); 
      }
      if( cbThursday.Checked() ){
        weekdays.Add( 4 ); 
      }
      if( cbFriday.Checked() ){
        weekdays.Add( 5 ); 
      }
      if( cbSaturday.Checked() ){
        weekdays.Add( 6 ); 
      }
      if( cbSunday.Checked() ){
        weekdays.Add( 7 ); 
      }
      skipWeek := [Number]efWeekly.Text();
      LocalTool::BatchSetUnitShiftPattern( dhSelectUnit.Data(),ddlShiftPattern.Data(),dsStartDate.Date(),dsEndDate.Date(),weekdays ,skipWeek );
      WebMessageBox::Success( "Success");
    *]
  }
}
