xiaoding721
2023-11-13 e4edcfd0b987b239526f5375881b919789782dad
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
Quintiq file version 2.0
#parent: #root
Method Edit (
  internal[GUIComponent] parent,
  FulfillmentRestriction selection
) id:Method_DialogCreateEditFulfillmentRestriction_Edit
{
  #keys: '[123718.0.364072433]'
  Body:
  [*
    // Edit fulfillment restriction
    data := shadow( selection );
    
    Dialog.Data( data );
    
    CheckBoxHasStart.Checked( data.StartDate().IsFinite() );
    CheckBoxHasEnd.Checked( data.EndDate().IsFinite() );
    
    if ( Dialog.DoModal( parent ) > 0 )
    {
      selection.Update( SelectionSalesSegment.Data().Name(), 
                        SelectionProduct.Data().ID(), 
                        GUIDateTimeSelectorStartDate.DateTime().Date(),
                        GUIDateTimeSelectorEndDate.DateTime().Date() ); 
      data.Commit();
    }
  *]
}