| 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
 | | Quintiq file version 2.0 |  | #parent: #root |  | Method NewSupplySpecification ( |  |   internal[GUIComponent] parent |  | ) as SupplySpecification id:Method_DialogCreateEditSupplySpecification_NewSupplySpecification |  | { |  |   #keys: '[112884.0.287583750]' |  |   Body: |  |   [* |  |     // New supply specification |  |      |  |     data := construct( shadow [SupplySpecification], UnitID := "", ProductID := "", Start := MacroPlan.StartOfPlanning(), End := DateTime::MaxDateTime() ); |  |      |  |     Dialog.Data( data ); |  |     Dialog.SetDefaultValue(); |  |     Dialog.EnableDisableComponent(); |  |     Dialog.EnableDisableEditorMaxQuantity(); |  |      |  |     result := Dialog.DoModal( parent ); |  |     newobj := null( SupplySpecification ); |  |      |  |     if( result > 0 ) |  |     { |  |       newobj := SupplySpecification::Create( data.Unit(), |  |                                              data.Product_MP(), |  |                                              ifexpr( CheckBoxHasStart.Checked(), data.Start(), DateTime::MinDateTime() ), // Read-only, apply changes to shadow is not taking place for read-only attribute when editing |  |                                              ifexpr( CheckBoxHasEnd.Checked(), data.End(), DateTime::MaxDateTime() ), |  |                                              data.MinQuantity(), |  |                                              data.TargetQuantity(), |  |                                              data.HasMaxQuantity(), |  |                                              data.MaxQuantity(), |  |                                              false ); |  |     } |  |      |  |     return newobj; |  |   *] |  | } | 
 |