| Quintiq file version 2.0 | 
| #parent: #root | 
| Method EnableDisableBatch () id:Method_DialogCreateEditUnitCost_EnableDisableBatch | 
| { | 
|   #keys: '[145730.1.988088]' | 
|   Body: | 
|   [* | 
|     // Enable /disable batch edit components | 
|     isBatch := DataHolderDialogDatas.Data().Size() > 1; | 
|     isBatchCreate := DataHolderUnits.Data().Size() > 1; | 
|     DropDownListAccount.Enabled( not isBatch, 'Not allowed in batch edit.' ); | 
|     DropDownStringListCostDriver.Enabled( not isBatch, 'Not allowed in batch edit.' ); | 
|     DropDownListUnit.Enabled( not (isBatchCreate or isBatch), 'Not allowed in batch create/edit.' ); | 
|     DateSelectorCostStart.Enabled( not isBatch, 'Not allowed in batch edit.' ); | 
|      | 
|     // Time unit, length of time, cost disabled when created | 
|     DropDownStringListTimeUnit.Enabled( not isBatch, '' ); | 
|     EditFieldLengthOfTime.Enabled( not isBatch, '' ); | 
|     EditFieldCost.Enabled( not isBatch, '' ) | 
|      | 
|     CheckboxBatchEditTimeUnit.Visible( isBatch ); | 
|     CheckboxBatchEditTimeUnit.Visible( isBatch ); | 
|     CheckboxBatchEditLengthOfTime.Visible( isBatch ); | 
|     CheckboxBatchEditCost.Visible( isBatch ); | 
|   *] | 
| } |