Touchstone Re 2023 API Reference
CopyProgram Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ReinsuranceProgramManagementServiceClient Class : CopyProgram Method
Contains a CopyProgramRequest that specifies the Business Unit SID and SQL Instance SID associated with the reinsurance program to copy, as well as the CopyOptions object that enables you to configure the copy job.
Copies a Reinsurance Program.

A reinsurance program is a collection of one or more layers or reinsurance treaties that you can use when you run analyses.

When submitting the request, you specify whether to copy the relationships and inuring (or child) reinsurance programs associated with the intial program to copy.

Syntax
Public Function CopyProgram( _
   ByVal request As CopyProgramRequest _
) As CopyProgramResponse
Dim instance As ReinsuranceProgramManagementServiceClient
Dim request As CopyProgramRequest
Dim value As CopyProgramResponse
 
value = instance.CopyProgram(request)

Parameters

request
Contains a CopyProgramRequest that specifies the Business Unit SID and SQL Instance SID associated with the reinsurance program to copy, as well as the CopyOptions object that enables you to configure the copy job.

Return Value

A CopyProgramResponse that contains the Target Program SID that uniquely identifies the copied reinsurance program.
Remarks
To find the Business Unit SID to pass into this method, call the GetBusinessUnits() method.

To find the SQL Instance SID to pass into this method, call the GetSqlInstances() method.

To find the Company SID to pass into this method, call the GetCompanies() method.

To find the Program SID to pass into this method, call the GetPrograms() method.

Example
The following example shows how to copy a reinsurance program using the CopyProgram() method:
using AIR.Services.Common.Data;
 using AIR.Services.Reinsurance.ProgramManagement.Api;
 using AIR.Services.Reinsurance.ProgramManagement.Data;
 using System;
            
 public class SnippetCopyProgram
 {
 private static void CopyProgram(int businessUnitSid, int sqlInstanceSid, int programSid, int targetCompanySid, string targetProgramName)
 {
 ReinsuranceProgramManagementServiceClient client = new ReinsuranceProgramManagementServiceClient();
 CopyProgramRequest request = new CopyProgramRequest();
 request.BusinessUnitSid = businessUnitSid;
 request.SqlInstanceSid = sqlInstanceSid;
            
 request.CopyOptions = new CopyProgramApiOptions
    {
 Mode = CopyMode.ProgramOnly,
 ProgramSid = programSid,
 TargetCompanySid = targetCompanySid,
 TargetProgramName = targetProgramName
 };
 CopyProgramResponse response = client.CopyProgram(request);
    if ((response.Status.Code == StatusCode.Success))
    {
 Console.WriteLine("Successfully created a copy with ProgramSid: " + response.TargetProgramSid);
            
 }
 }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ReinsuranceProgramManagementServiceClient Class
ReinsuranceProgramManagementServiceClient Members