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
38
39
40
41
42
43
44
45
| Quintiq file version 2.0
| #parent: #root
| StaticMethod CreateUpdate (
| output owning LaneLegCosts laneLegCosts,
| LaneLegs laneLegs,
| Account_MP account,
| String costDriver,
| Date start,
| String timeUnit,
| Number lengthOfTime,
| Boolean isEditCost,
| Real cost,
| Boolean isFromDB
| )
| {
| TextBody:
| [*
| // Create update laneleg cost
| isCreate := laneLegCosts.Size() = 0;
| if( isCreate )
| {
| laneLegCosts := LaneLegCost::Create( laneLegs,
| account,
| costDriver,
| start,
| timeUnit,
| lengthOfTime,
| cost,
| isFromDB );
| }
| else
| {
| // Batch update
| LaneLegCost::Update( &laneLegCosts,
| laneLegs,
| account,
| costDriver,
| start,
| timeUnit,
| lengthOfTime,
| isEditCost, cost,
| isFromDB );
| }
| *]
| }
|
|