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.
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);
}
}
}
}
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