Touchstone 11.0 API Reference
CreateCompany Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > CompanyManagementServiceClient Class : CreateCompany Method
Contains a CreateCompanyRequest that identifies the name, identifier, Business Unit Sequential Identifier (SID), and SQL Instance SID to associate with the company to create.
Creates a new, empty Touchstone Re Company.
Syntax
Public Function CreateCompany( _
   ByVal request As CreateCompanyRequest _
) As CreateCompanyResponse
Dim instance As CompanyManagementServiceClient
Dim request As CreateCompanyRequest
Dim value As CreateCompanyResponse
 
value = instance.CreateCompany(request)
public CreateCompanyResponse CreateCompany( 
   CreateCompanyRequest request
)

Parameters

request
Contains a CreateCompanyRequest that identifies the name, identifier, Business Unit Sequential Identifier (SID), and SQL Instance SID to associate with the company to create.

Return Value

A CreateCompanyResponse that contains a SID, which uniquely identifies the company that you created.
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.

A company is a container for exposure data, company loss files, reinsurance programs, and loss results that you want to keep together.

Example
The following example shows how to create a Company using the CreateCompany() method:
using AIR.Services.Common.Data;
using AIR.Services.Reinsurance.CompanyManagement.Api;
using System;
            
class SnippetCreateCompany
{
    private static void CreateCompany(int businessUnitSid, int sqlInstanceSid, string companyName)
    {
        CompanyManagementServiceClient client = new CompanyManagementServiceClient();
        CreateCompanyRequest request = new CreateCompanyRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.Name = companyName;
        CreateCompanyResponse response = client.CreateCompany(request);
        if (response.Status.Code == StatusCode.Success)
        {
            Console.WriteLine("Successfully created company: " + companyName + " with Sid: " + response.Sid);
        }
    }
}
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