Touchstone Re 2023 API Reference
GetAvailableProgramsToCreateProgramRelationships Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ReinsuranceProgramManagementServiceClient Class : GetAvailableProgramsToCreateProgramRelationships Method
Contains a GetAvailableProgramsToCreateProgramRelationshipsRequest that identifies the Business Unit Sequential Identifier (SID), SQL Instance SID, and Program SID associated with the list of programs to retrieve.
Retrieves a list of the valid potential sourcing or inuring Reinsurance Programs for a given program in a given Business Unit and SQL Server Instance.

You can use the programs you retrieve to create Reinsurance Program Relationships.

Syntax

Parameters

request
Contains a GetAvailableProgramsToCreateProgramRelationshipsRequest that identifies the Business Unit Sequential Identifier (SID), SQL Instance SID, and Program SID associated with the list of programs to retrieve.

Return Value

A GetAvailableProgramsToCreateProgramRelationshipsResponse that contains a list of programs associated with the specified SQL server instance, business unit, and 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 program SID to pass into this method, call the GetPrograms() method.

Example
The following example shows how to retrieve a list of valid potential sourcing or inuring programs for a given reinsurance program using the GetAvailableProgramsToCreateProgramRelationships() method:
using AIR.Services.Common.Data;
using AIR.Services.Reinsurance.ProgramManagement.Api;
using System;
            
class SnippetGetAvailableProgramsToCreateProgramRelationships
             
{
private static void GetAvailableProgramsToCreateProgramRelationships(int businessUnitSid, int sqlInstanceSid, int programSid)
{
ReinsuranceProgramManagementServiceClient client = new ReinsuranceProgramManagementServiceClient();
GetAvailableProgramsToCreateProgramRelationshipsRequest request = new GetAvailableProgramsToCreateProgramRelationshipsRequest();
request.BusinessUnitSid = businessUnitSid;
request.SqlInstanceSid = sqlInstanceSid;
request.ProgramSid = programSid;
            
GetAvailableProgramsToCreateProgramRelationshipsResponse response = client.GetAvailableProgramsToCreateProgramRelationships(request);
   if (response.Status.Code == StatusCode.Success)
   {
       foreach (int ProgramSID in response.AvailableProgramSids)
Console.WriteLine("Available sids: " + ProgramSID);
}
}
}
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