陈清红
2025-04-14 880f3c0257eeb8c37761d484258fdd102a369a19
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
Quintiq file version 2.0
#parent: #root
Method ImportExport_SetCheckBoxesImportProfile (
  shadow[UserImportProfile] userprofile,
  shadow[DefaultImportProfile] defaultprofile,
  internal[CheckBox] scenariospeccheckbox,
  internal[CheckBox] globalcheckbox
) id:Method_ApplicationLibMacroPlanner_ImportExport_SetCheckBoxesImportProfile
{
  #keys: '[146140.2.850082812]'
  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,
                                    e.IsIncludeInImportExport() );
      }
      else
      {
        checkAllScenario := forall( userprofile, ImportObjectGroupInUserProfile, e,
                                    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.IsIncludeInImportExport() );
    
      globalcheckbox.Checked( checkAllGlob );
    }
  *]
}