renhao
2023-10-13 462215553c754d26acde8edab81b4a73f774e21e
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
Quintiq file version 2.0
#parent: #root
Method SetAttributeAfterApplyData () id:Method_DialogCreateEditStockingPoint_SetAttributeAfterApplyData
{
  #keys: '[135040.0.232650761]'
  Body:
  [*
    // Set attributes before commiting the data
    //..following TC style
    data := DataHolderDialogData.Data();
    
    unitid := '';
    parentUnit := selParentUnit.Data();
    if( not isnull(  parentUnit ) )
    {
      unitid := parentUnit.ID();
    }            
    data.UnitID( unitid );
    
    //handle validity start/end
    start := Date::MinDate();
    end := Date::MaxDate();
    if( CheckboxHasStart.Checked() )
    {
      start := dsStart.Date();
    }
    if( CheckboxHasEnd.Checked() )
    {
      end := dsEnd.Date();
    }
    
    data.Start( start );
    data.End( end );
  *]
}