Touchstone 11.0 API Reference
GetProgram Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ReinsuranceProgramManagementServiceClient Class : GetProgram Method
Contains a GetProgramRequest that identifies the system-generated program sequential identifier (SID), Business Unit SID, and SQL Instance SID associated with the reinsurance program to retrieve.
Retrieves a Touchstone Re Reinsurance Program.
Syntax
Public Function GetProgram( _
   ByVal request As GetProgramRequest _
) As GetProgramResponse
Dim instance As ReinsuranceProgramManagementServiceClient
Dim request As GetProgramRequest
Dim value As GetProgramResponse
 
value = instance.GetProgram(request)
public GetProgramResponse GetProgram( 
   GetProgramRequest request
)

Parameters

request
Contains a GetProgramRequest that identifies the system-generated program sequential identifier (SID), Business Unit SID, and SQL Instance SID associated with the reinsurance program to retrieve.

Return Value

A GetProgramResponse containing the program that you requested.
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 Program SID to pass into this method, call the GetPrograms() method.

Example
The following example shows how to retrieve an existing Program using the GetProgram() method:
using AIR.Services.Common.Data;
using AIR.Services.Reinsurance.ProgramManagement.Api;
using System;
            
class SnippetGetProgram
{
    private static void GetProgram(int businessUnitSid, int sqlInstanceSid, int programSid)
    {
        ReinsuranceProgramManagementServiceClient client = new ReinsuranceProgramManagementServiceClient();
        GetProgramRequest request = new GetProgramRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.ProgramSid = programSid;
            
        GetProgramResponse response = client.GetProgram(request);
        if (response.Status.Code == StatusCode.Success)
        {
            Console.WriteLine("Sid: " + response.Program.Sid);
            Console.WriteLine("Name: " + response.Program.Name);
            Console.WriteLine("Type: " + response.Program.ProgramTypeCode);
            Console.WriteLine("Inception Date: " + response.Program.InceptionDate);
            int count = response.Program.CatBondNotes.Count;
            for (int i = 0; i < count; i++)
            {
                Console.WriteLine("Catbond[" + i + "]: " + response.Program.CatBondNotes[i].Name + " - " + response.Program.CatBondNotes[i].Value);
            }
        }
    }
}
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