| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod LinkOperation ( | 
|   Operation sourceoperation, | 
|   OperationInput destinationoperationinput, | 
|   output OperationLinks trash | 
| ) as OperationLink | 
| { | 
|   Description: 'Add given operations as souce operation.' | 
|   TextBody: | 
|   [* | 
|     // DWE2 Feb-1-2016 (created) | 
|      | 
|     destinationoperation := destinationoperationinput.Operation(); | 
|     defaultqty := sourceoperation.MacroPlan().GlobalParameters_MP().DefaultOperationInputOutputQuantity(); | 
|      | 
|     sourcegroupid := BaseOperationLink::GetGroupID( sourceoperation, false, true ); | 
|     destinationgroupid := destinationoperationinput.OperationLinkGroupID(); | 
|      | 
|     ol := OperationLink::CreateOrDelete( sourceoperation, | 
|                                          destinationoperation, | 
|                                          trash, | 
|                                          sourcegroupid, | 
|                                          destinationgroupid, | 
|                                          defaultqty, // Source quantity | 
|                                          destinationoperationinput.HasUserQuantityInInputGroup(), | 
|                                          destinationoperationinput.Quantity(), // destination quantity | 
|                                          destinationoperationinput.MinQuantity(), // destiantion min quantity | 
|                                          destinationoperationinput.MaxQuantity(), // destination max quantity | 
|                                          destinationoperationinput.GetInputGroupQuantity() ); // destination group quantity | 
|      | 
|     return ol; | 
|   *] | 
| } |