陈清红
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
Quintiq file version 2.0
#parent: #root
Method ExportToDataManager () id:Method_DialogExport_ExportToDataManager
{
  #keys: '[136682.0.2056251391]'
  Body:
  [*
    // Export to data manager
    // 1. Find SetType
    /*
    setTypeMeta := selectobject( LibDEF_DataBroker, System.SetTypeMeta, stm,
                                        stm.System().IsLocalSystem(),
                                        stm.ChannelName() = LibDEC_ChannelManufacturingDemand::CHANNEL_NAME() and
                                        stm.Name()        = LibDEC_ChannelManufacturingDemand::SETTYPE_NAME_Constrained_Forecast() );
    
    // Create SetType if needed
    setType := null( LibDEF_SetType );
    if( isnull( setTypeMeta ) )
    {
      setType := LibDEF_SetType::Create( LibDEF_DataRepository, LibDEC_ChannelManufacturingDemand::CHANNEL_NAME(), LibDEC_ChannelManufacturingDemand::SETTYPE_NAME_Constrained_Forecast() );
    }
    else
    {
      setType := selectobject( LibDEF_DataRepository, Channel.SetType, st,
                               st.ChannelName() = LibDEC_ChannelManufacturingDemand::CHANNEL_NAME(),
                               st.Name()        = LibDEC_ChannelManufacturingDemand::SETTYPE_NAME_Constrained_Forecast() );
    }
    
    set := selectobject( LibDEF_DataRepository, Channel.SetType.Set, s,
                         guard( s.GUID() = DropDownListSalesDemand.Data().GUID(), false ) );
    
    MacroPlan.ExportToDM( CheckboxSalesDemands.Checked(),
                          set,
                          EditFieldSalesDemand.Text().Length() > 0,
                          setType,
                          EditFieldSalesDemand.Text() );
    */
  *]
}