Quintiq file version 2.0
#parent: #root
Method EnableDisableComponent (
  Boolean isbatchedit,
  Boolean enableprimarykeyselectors
) id:Method_DialogCreateEditTransportAvailability_EnableDisableComponent
{
  #keys: '[135040.0.3063540]'
  Body:
  [*
    // Enable disable components 
    // GroupPanelGeneral
    if( isbatchedit or not enableprimarykeyselectors )
    {
      SelectionUnit.DisableWithUserFeedback( Translations::MP_Designer_DisableSelectorForBatchEditAndWhenEditFromPeriodList( 'unit' ) );
      GUIStartDateTimeSelector.DisableWithUserFeedback( Translations::MP_Designer_DisableSelectorForBatchEditAndWhenEditFromPeriodList( 'start date' ) );
    }
    // ShiftPattern
    SelectionShiftPattern.Enabled( not isbatchedit
                                   or( isbatchedit and CheckBoxBatchEditShiftPattern.Checked() ) );
     
    // GroupPanelMaintenance
    GroupPanelMaintenance.Enabled( not isbatchedit
                                   or( isbatchedit and CheckBoxBatchEditMaintenance.Checked() ) );
    
    // GroupPanelLotSize
    EditorLotSize.Enabled( not isbatchedit
                               or( isbatchedit and CheckBoxBatchEditLotSize.Checked() ) );
     
    // Capacities min max
    EditorMaximumQuantity.Enabled( not isbatchedit
                                   or( isbatchedit and CheckBoxBatchEditCapacity.Checked() ) );
    
    // EditorNumberOfUnit
    EditorNumberOfUnit.Enabled( not isbatchedit
                                     or( isbatchedit and CheckBoxBatchEditNumberOfUnit.Checked() ) );
  *]
}
