Touchstone 11.0 API Reference
DeleteProgramRelationships Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ReinsuranceProgramManagementServiceClient Class : DeleteProgramRelationships Method
Contains a DeleteProgramRelationshipsRequest that identifies the list of relationships delete as well as the Business Unit SID, SQL Instance SID, and Program SID associated with the relationships.
Deletes one or more Reinsurance Program Relationships.
Syntax
Public Function DeleteProgramRelationships( _
   ByVal request As DeleteProgramRelationshipsRequest _
) As DeleteProgramRelationshipsResponse
Dim instance As ReinsuranceProgramManagementServiceClient
Dim request As DeleteProgramRelationshipsRequest
Dim value As DeleteProgramRelationshipsResponse
 
value = instance.DeleteProgramRelationships(request)
public DeleteProgramRelationshipsResponse DeleteProgramRelationships( 
   DeleteProgramRelationshipsRequest request
)

Parameters

request
Contains a DeleteProgramRelationshipsRequest that identifies the list of relationships delete as well as the Business Unit SID, SQL Instance SID, and Program SID associated with the relationships.

Return Value

A DeleteProgramRelationshipsResponse that contains the list of relationships you deleted.
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 delete one or more existing Reinsurance Program Relationships using the DeleteProgramRelationships() method:
using AIR.Services.Common.Data;
 using AIR.Services.Reinsurance.ProgramManagement.Api;
 using AIR.Services.Reinsurance.ProgramManagement.Data;
 using System;
 using System.Collections.Generic;
            
 class SnippetDeleteProgramRelationships
 {
    private static void DeleteProgramRelationships(int businessUnitSid, int sqlInstanceSid, int programSid, int subjectProgramSid, int inuringProgramSid)
    {
        ReinsuranceProgramManagementServiceClient client = new ReinsuranceProgramManagementServiceClient();
            
        DeleteProgramRelationshipsRequest request = new DeleteProgramRelationshipsRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.ProgramSid = programSid;
        request.Relationships = new List<ProgramRelationship>
            {
                new ProgramRelationship()
                {
                    SubjectProgramSid = subjectProgramSid,
                    InuringSourcingProgramSid = inuringProgramSid
                }
            };
            
        DeleteProgramRelationshipsResponse response = client.DeleteProgramRelationships(request);
        if (response.Status.Code == StatusCode.Success)
        {
            Console.WriteLine("Program Relationship deleted");
        }
    }
}
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