| Quintiq file version 2.0 | 
| #parent: #root | 
| Method EditCampaignType ( | 
|   CampaignType_MP campaigntype, | 
|   internal[GUIComponent] parent | 
| ) id:Method_DialogCreateEditCampaignType_EditCampaignType | 
| { | 
|   #keys: '[110880.4.850023316]' | 
|   Body: | 
|   [* | 
|     // Edit campaign type | 
|      | 
|     data := shadow( campaigntype ); | 
|     Dialog.Data( data ); | 
|      | 
|     Dialog.InitializeDialog(); | 
|      | 
|     result := Dialog.DoModal( parent ); | 
|      | 
|     if( result > 0 ) | 
|     { | 
|       campaigntype.Update( data.Unit(), | 
|                            EditorName.Text(), // Read-only, apply changes to shadow is not taking place for read-only attribute when editing | 
|                            RadioButtonGroupQuantityDuration.BoundValue(), | 
|                            data.DefaultMinQuantity(), | 
|                            data.DefaultMaxQuantity(), | 
|                            data.DefaultMinDuration(), | 
|                            data.DefaultMaxDuration(), | 
|                            data.Color(), | 
|                            data.HasInputMaxQuantity() and RadioButtonGroupQuantityDuration.BoundValue() = GlobalParameters_MP::GetCampaignTransitionsTypeQuantity(), | 
|                            data.HasInputMaxDuration() and RadioButtonGroupQuantityDuration.BoundValue() = GlobalParameters_MP::GetCampaignTransitionsTypeDuration(), | 
|                            false ); | 
|     } | 
|   *] | 
| } |