Touchstone 11.0 API Reference
CreateProject Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ProjectManagementServiceClient Class : CreateProject Method
Contains a CreateProjectRequest that identifies the Name and optional Description of the Project that you want to create, along with the associated Touchstone-generated Business Unit Sequential Identifier (SID) and SQL Instance SID.
Creates a new Touchstone® Project.
Syntax
Public Function CreateProject( _
   ByVal request As CreateProjectRequest _
) As CreateProjectResponse
Dim instance As ProjectManagementServiceClient
Dim request As CreateProjectRequest
Dim value As CreateProjectResponse
 
value = instance.CreateProject(request)

Parameters

request
Contains a CreateProjectRequest that identifies the Name and optional Description of the Project that you want to create, along with the associated Touchstone-generated Business Unit Sequential Identifier (SID) and SQL Instance SID.

Return Value

A CreateProjectResponse containing the Project SID, which uniquely identifies the Project that you have 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.

Example
The following example shows how to create a Touchstone Project using the CreateProject() method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.ProjectManagement.Api;
            
class SnippetCreateProjectRequest
{
    private static void CreateProject(int businessUnitSid, int sqlInstanceSid, string projectName, string projectDesc)
    {
        ProjectManagementServiceClient projectClient = new ProjectManagementServiceClient();
        CreateProjectRequest request = new CreateProjectRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.Name = projectName;
        request.Description = projectDesc;
        CreateProjectResponse response = projectClient.CreateProject(request);
        if (response.Status.Code == StatusCode.Success)
        {
            Console.WriteLine("Project " + request.Name + " created with SID: " + response.ProjectSid);
        }
    }
}
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

ProjectManagementServiceClient Class
ProjectManagementServiceClient Members