yanweiyuan3
2023-08-09 98db93a55d7079e89c706c18b15eeaecd0ec539a
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Quintiq file version 2.0
#parent: #root
Method EnableDisableComponents () id:Method_DialogCreateEditServiceLevel_EnableDisableComponents
{
  #keys: '[113694.2.1012445984]'
  Body:
  [*
    // Enable disable components
    if( DataHolderChildProducts.Data().Size() > 0 )
    {
      if( CheckBoxProduct.Checked() )
      {
        SelectionProduct.Enabled( true );
      }
      else
      {
        SelectionProduct.DisableWithUserFeedback( Translations::MP_Designer_DialogCreateEditServiceLevel_DisableProduct() );
      }
    }
    else
    {  
      CheckBoxProduct.Checked( false );
      CheckBoxProduct.DisableWithUserFeedback( Translations::MP_InventorySpecification_CanCreateNew_EmptyProductNavSelection() );
      SelectionProduct.DisableWithUserFeedback( Translations::MP_InventorySpecification_CanCreateNew_EmptyProductNavSelection() );
    }
    
    if( DataHolderChildStockingPoints.Data().Size() > 0 )
    {
      if( CheckBoxStockingPoint.Checked() )
      {
        SelectionStockingPoint.Enabled( true );
      }
      else
      {
        SelectionStockingPoint.DisableWithUserFeedback( Translations::MP_Designer_DialogCreateEditServiceLevel_DisableStockingPoint() );
      }
    }
    else
    {  
      CheckBoxStockingPoint.Checked( false );
      CheckBoxStockingPoint.DisableWithUserFeedback( Translations::MP_InventorySpecification_CanCreateNew_EmptyStockingPointNavSelection() );
      SelectionStockingPoint.DisableWithUserFeedback( Translations::MP_InventorySpecification_CanCreateNew_EmptyStockingPointNavSelection() );
    }
  *]
}