| 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 Update ( |  |   String id, |  |   String name, |  |   String parentid |  | ) |  | { |  |   TextBody: |  |   [* |  |     // 甄兰鸽 May-31-2024 (created) |  |     hasnewparent := guard( this.Parent().ID(),'' ) <> parentid; |  |      |  |     parent := LibCal_EventType::FindEventTypeIndex( parentid ); |  |     isroot := isnull( parent ); |  |      |  |     this.UpdateTypeIndex( id ); |  |     this.Name( name ); |  |      |  |     //Update the parent relations |  |     if( hasnewparent ) |  |     { |  |       this.AssignParent( parent ); |  |     } |  |     else if( isroot ) |  |     { |  |       this.SetRootEvent(); |  |     } |  |   *] |  | } | 
 |