| Quintiq file version 2.0 | 
| #parent: #root | 
| Method Update ( | 
|   Unit owner, | 
|   DateTime earlieststart, | 
|   Duration duration, | 
|   Number sequencenumberforexcel, | 
|   Real minqty, | 
|   Real maxqty, | 
|   Duration minduration, | 
|   Duration maxduration, | 
|   String campaigntypename, | 
|   String campaignid, | 
|   String comment, | 
|   Boolean hasinputmaxquantity, | 
|   Boolean hasinputmaxduration, | 
|   Boolean isfromdb | 
| ) | 
| { | 
|   Description: 'Update Campaign' | 
|   TextBody: | 
|   [* | 
|     if( owner <> this.Unit() | 
|         or sequencenumberforexcel <> this.SequenceNumberForExcel() ) | 
|     { | 
|       this.ResetPeriodTasks(); | 
|     } | 
|      | 
|     owner.Campaign_MP( relmove, this ); | 
|     maxqty := ifexpr( hasinputmaxquantity, maxqty, 0 ); | 
|     maxduration := ifexpr( hasinputmaxduration, maxduration, Duration::Zero() ); | 
|      | 
|     this.UpdateTypeIndex( owner.ID(), campaignid, campaigntypename ); | 
|     this.EarliestStart(earlieststart ); | 
|     this.Duration( duration ); | 
|     this.SequenceNumberForExcel( sequencenumberforexcel ); | 
|     this.HasInputMaxQuantity( hasinputmaxquantity ); | 
|     this.HasInputMaxDuration( hasinputmaxduration ); | 
|     this.CampaignTypeName( campaigntypename ); | 
|     this.MinQuantity( minqty ); | 
|     this.MaxQuantity( maxqty ); | 
|     this.MinDuration( minduration ); | 
|     this.MaxDuration( maxduration ); | 
|     this.Comment( comment ); | 
|      | 
|     this.IsManuallyConfigured( not isfromdb ); | 
|   *] | 
| } |