hongji.li
2023-11-11 df5a7e1ad6835e78b2f9eb7428817b0c23b116bc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 );
  *]
}