| Quintiq file version 2.0 | 
| #parent: #root | 
| Method SetAttributesAfterOnApplyData () id:Method_DialogCreateEditLane_SetAttributesAfterOnApplyData | 
| { | 
|   #keys: '[109478.0.549768960]' | 
|   Body: | 
|   [* | 
|     // Set user attributes based on declarative value binded with the components after on apply data | 
|      | 
|     data := Dialog.Data(); | 
|      | 
|     /* Since Name declaratively refers to SystemName, | 
|        Set SystemName to EditorName. | 
|        This is not done in the Editor's binding because the name will not appear | 
|        on the editor when editing existing operation */ | 
|     data.SystemName( EditorName.Text() ); | 
|      | 
|     // If the components are disabled, the date time is not updated by the data binding. | 
|     data.Start( GUIDateTimeSelectorStart.DateTime().Date() ); | 
|     data.End( GUIDateTimeSelectorEnd.DateTime().Date() ); | 
|      | 
|     /* | 
|     // Delete generated costs which belongs to different unit | 
|     traverse( data, LaneCost, lc, | 
|               isnull( lc.WrappedInstance() ) | 
|               /* There is two sitiuation | 
|                  1) User created an account assignment, we will remove the cost generated for others unit. | 
|                  2) User removed account assignment, we will remove the shadow cost. | 
|                  Guard as: | 
|                  AccountCost.AccountAssignment will be null if the account assignment is being removed, | 
|                  true so the orphan cost will be removed | 
|      | 
|               and guard( lc.UnitAccount().Unit() <> data.Unit(), true ) ) | 
|     { | 
|       lc.Delete(); | 
|     } | 
|     */ | 
|   *] | 
| } |