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
Quintiq file version 2.0
#parent: #root
Method EditSalesSegment (
  internal[GUIComponent] parent,
  SalesSegment_MP selection
) as Number id:Method_DialogCreateEditSalesSegment_EditSalesSegment
{
  #keys: '[107654.0.932618380]'
  Body:
  [*
    // Edit sales segment
    this.Data( selection );
    DataHolderParentSalesSegment.Data( selection.Parent() );
    CheckBoxParentSalesSegment.Checked( not isnull( selection.Parent() ) );
    Dialog.EnableDisableComponents();
    
    result := this.DoModal( parent );
    if ( result > 0 )
    {
      displayindex := ApplicationLibMacroPlanner.FormatStringToNumber( EditorIndex.Text(), 0 );
      parentSalesSegment := null( SalesSegment_MP );
      if( CheckBoxParentSalesSegment.Checked() )
      {
        parentSalesSegment := SelectionParentSalesSegment.Data();
      }
      Dialog.Data().Update( EditorName.Text(), parentSalesSegment, displayindex, false );
    }
    return result;
  *]
}