Touchstone Re 2023 API Reference
CopyExposureSetYear Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > CompanyManagementServiceClient Class : CopyExposureSetYear Method
Contains a CopyExposureSetYearRequest that specifies the Business Unit SID and SQL Instance SID associated with the exposure set data to copy, as well as the CopyOptions object that enables you to configure the copy job.
Copies one year of Exposure Set data.

An exposure set is a collection of exposure data such as sums insured, risk count, premium, rate, payroll, and market share data.

When submitting the request, you specify the exposure year to copy from and the exposure year and Company to copy to.

Syntax
Public Function CopyExposureSetYear( _
   ByVal request As CopyExposureSetYearRequest _
) As CopyExposureSetYearResponse
Dim instance As CompanyManagementServiceClient
Dim request As CopyExposureSetYearRequest
Dim value As CopyExposureSetYearResponse
 
value = instance.CopyExposureSetYear(request)

Parameters

request
Contains a CopyExposureSetYearRequest that specifies the Business Unit SID and SQL Instance SID associated with the exposure set data to copy, as well as the CopyOptions object that enables you to configure the copy job.

Return Value

A CopyExposureSetYearResponse that contains the Exposure Set SID that uniquely identifies the copied exposure set.
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.

To find the Exposure Set SID to pass into this method, call the GetExposureSets() method.

Example
The following example shows how to copy one year of exposure data using the CopyExposureSetYear() method:
using AIR.Services.Common.Data;
 using AIR.Services.Reinsurance.CompanyManagement.Api;
 using AIR.Services.Reinsurance.ExposureManagement.Data;
 using System;
            
 public class SnippetCopyExposureSetYear
 {
 private static void CopyExposureSetYear(int businessUnitSid, int sqlInstanceSid, int companySid, int exposureSetSid, string newExposureSetName, short yearToCopyFrom, short yearToCopyTo)
 {
 CompanyManagementServiceClient client = new CompanyManagementServiceClient();
 CopyExposureSetYearRequest request = new CopyExposureSetYearRequest();
 request.BusinessUnitSid = businessUnitSid;
 request.SqlInstanceSid = sqlInstanceSid;
            
 request.CopyOptions = new CopyExposureSetYearApiOptions()
    {
 ExposureSetSid = exposureSetSid,
 NewExposureSetName = newExposureSetName,
 SourceYear = yearToCopyFrom,
 TargetCompanySid = companySid,
 TargetYear = yearToCopyTo
 };
 CopyExposureSetYearResponse response = client.CopyExposureSetYear(request);
    if ((response.Status.Code == StatusCode.Success))
    {
 Console.WriteLine("Copied to New ExposureSet Sid: " + response.ExposureSetSid);
 }
}
            
 }
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

CompanyManagementServiceClient Class
CompanyManagementServiceClient Members