Touchstone 11.0 API Reference
DeletePortfolio Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ReinsurancePortfolioManagementServiceClient Class : DeletePortfolio Method
Contains a DeletePortfolioRequest that identifies the software-generated sequential identifier (SID) that uniquely identifies the portfolio to delete, as well as the Business Unit SID and SQL Instance SID associated with the portfolio.
Deletes a Portfolio.
Syntax
Public Function DeletePortfolio( _
   ByVal request As DeletePortfolioRequest _
) As DeletePortfolioResponse
Dim instance As ReinsurancePortfolioManagementServiceClient
Dim request As DeletePortfolioRequest
Dim value As DeletePortfolioResponse
 
value = instance.DeletePortfolio(request)
public DeletePortfolioResponse DeletePortfolio( 
   DeletePortfolioRequest request
)

Parameters

request
Contains a DeletePortfolioRequest that identifies the software-generated sequential identifier (SID) that uniquely identifies the portfolio to delete, as well as the Business Unit SID and SQL Instance SID associated with the portfolio.

Return Value

A DeletePortfolioResponse that contains the status of the deletion.
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 portfolio SID to pass into this method, call the GetPortfolios() method.

Example
The following example shows how to delete an existing Program using the SubmitDeleteProgram() method:
using AIR.Services.Common.Data;
using AIR.Services.Reinsurance.PortfolioManagement.Api;
using System;
            
class SnippetPortfolioAPIs
{
    private static void DeletePortfolio(int businessUnitSid, int sqlInstanceSid, int portfolioSid)
    {
        ReinsurancePortfolioManagementServiceClient client = new ReinsurancePortfolioManagementServiceClient();
            
        DeletePortfolioRequest request = new DeletePortfolioRequest();
        //Set the BusinessUnitSid property (required property)
        request.BusinessUnitSid = businessUnitSid;
        //Set the SqlInstanceSid property (required property)
        request.SqlInstanceSid = sqlInstanceSid;
        //Set the PortfolioSid property. (required property)
        request.PortfolioSid = portfolioSid;
        //Submit the request and get response back
        DeletePortfolioResponse response = client.DeletePortfolio(request);
        //Validate the response. Response is valid if Response.Status.Code is equal to StatusCode.Success
        if (response.Status.Code == StatusCode.Success)
        {
            Console.WriteLine("Portfolio 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

ReinsurancePortfolioManagementServiceClient Class
ReinsurancePortfolioManagementServiceClient Members