| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod CreateLaneLegFromJson ( | 
|   JSON datarow | 
| ) as LaneLeg | 
| { | 
|   Description: 'Create LaneLeg From Json' | 
|   TextBody: | 
|   [* | 
|     // Administrator Jul-12-2023 (created) | 
|     laneid := datarow.Get( "laneid" ).GetString(); | 
|     originstockingpointid := datarow.Get( "originstockingpointid" ).GetString(); | 
|     destinationstockingpointid := datarow.Get( "destinationstockingpointid" ).GetString(); | 
|     name := datarow.Get( "name" ).GetString(); | 
|     userleadtime := datarow.Get( "userleadtime" ); | 
|     processingtime := Duration::Zero(); | 
|     hasprocessingtime := true; | 
|      | 
|     if( userleadtime.IsNull() ) | 
|     { | 
|       hasprocessingtime := false; | 
|       processingtime := Duration::Zero();  | 
|       } | 
|     else | 
|     { | 
|       hasprocessingtime := true; | 
|       processingtime := Duration::Hours( [Number]userleadtime.GetString() ); | 
|       }; | 
|      | 
|     lane := Lane::FindLaneTypeIndex( laneid ); | 
|      | 
|     result := LaneLeg::CreateLaneleg(lane, laneid, originstockingpointid, destinationstockingpointid, name, hasprocessingtime, processingtime); | 
|      | 
|     return result; | 
|   *] | 
| } |