hongji.li
2023-11-07 1a1ba3ad5ed9e4380185aa1ccad20204a0e5f115
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
46
Quintiq file version 2.0
#parent: #root
Method CheckUncheckCheckBox (
  shadow[UserImportProfile] userprofile,
  shadow[DefaultImportProfile] defaultprofile,
  internal[WebCheckbox] scenariospeccheckbox,
  internal[WebCheckbox] globalcheckbox
) id:Method_ApplicationMacroPlanner_CheckUncheckCheckBox
{
  #keys: '[136682.0.2038927049]'
  Body:
  [*
    // Check checkbox if all import group is included
    // Need two subclass due to shadow scope (base class relation not established yet)
    if( not isnull( scenariospeccheckbox ) )
    {
      checkAllScenario := scenariospeccheckbox.Checked();
      
      if( not isnull( defaultprofile ) )
      { 
        checkAllScenario := forall( defaultprofile, ImportObjectGroupInDefaultProfile, e,
                                    not e.ImportObjectGroup().IsGlobal(),
                                    e.IsIncludeInImportExport() );                                     
      }   
      else
      {
        checkAllScenario := forall( userprofile, ImportObjectGroupInUserProfile, e,
                                    not e.ImportObjectGroup().IsGlobal(),
                                    e.IsIncludeInImportExport() );
      }
                         
      scenariospeccheckbox.Checked( checkAllScenario );
    }  
    
    // There is no global for user profile
    if( not isnull( globalcheckbox )
        and not isnull( defaultprofile ) )
    {
      checkAllGlob := forall( defaultprofile, ImportObjectGroupInDefaultProfile, e,
                              e.ImportObjectGroup().IsGlobal(),
                              e.IsIncludeInImportExport() );                            
                                
      globalcheckbox.Checked( checkAllGlob );
    }
  *]
}