Touchstone 11.0 API Reference
GetPrograms Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ReinsuranceProgramManagementServiceClient Class : GetPrograms Method
Contains a GetProgramsRequest that identifies the Business Unit Sequential Identifier (SID), SQL Instance SID, and company SID associated with the list of programs to retrieve.
Retrieves a list of the existing reinsurance programs in a given Business Unit, SQL Server Instance, and company.
Syntax
Public Function GetPrograms( _
   ByVal request As GetProgramsRequest _
) As GetProgramsResponse
Dim instance As ReinsuranceProgramManagementServiceClient
Dim request As GetProgramsRequest
Dim value As GetProgramsResponse
 
value = instance.GetPrograms(request)
public GetProgramsResponse GetPrograms( 
   GetProgramsRequest request
)

Parameters

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

Return Value

A GetProgramsResponse that contains a list of programs in the specified SQL server instance, business unit, and company.
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.

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

Example
The following example shows how to retrieve a list of the existing Programs in a given company using the GetPrograms() method:
using AIR.Services.Common.Data;
using AIR.Services.Reinsurance.ProgramManagement.Api;
using System;
            
class SnippetGetPrograms
{
    private static void GetPrograms(int businessUnitSid, int sqlInstanceSid, int companySid)
    {
        ReinsuranceProgramManagementServiceClient client = new ReinsuranceProgramManagementServiceClient();
        GetProgramsRequest request = new GetProgramsRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.CompanySid = companySid;
            
        GetProgramsResponse response = client.GetPrograms(request);
        if (response.Status.Code == StatusCode.Success)
        {
            foreach (var program in response.Programs)
            {
                Console.WriteLine("Sid: " + program.Sid + " Name: " + program.Name + " Type: " + program.ProgramTypeCode);
            }
        }
    }
}
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