Touchstone 11.0 API Reference
SubmitDeleteProject Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ProjectManagementServiceClient Class : SubmitDeleteProject Method
Contains a SubmitDeleteProjectRequest that identifies the Touchstone-generated Project Sequential Identifier (SID) of the Project that you want to delete, along with the associated Business Unit SID and SQL Instance SID.
Deletes a single Touchstone® Project.
Syntax
Public Function SubmitDeleteProject( _
   ByVal request As SubmitDeleteProjectRequest _
) As SubmitDeleteProjectResponse
Dim instance As ProjectManagementServiceClient
Dim request As SubmitDeleteProjectRequest
Dim value As SubmitDeleteProjectResponse
 
value = instance.SubmitDeleteProject(request)

Parameters

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

Return Value

A SubmitDeleteProjectResponse containing the Activity SID that uniquely identifies the asynchronous web service call that you made to delete the specified Project that contained exposure data. If the Project that you specified for deletion did not contain any exposure data, the deletion occurs without the use of HPC. In this case, the Activity SID is 0.
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 Project SID to pass into this method, call the GetProjects() method.

Example
The following example shows how to delete a Touchstone Project using the SubmitDeleteProject() method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.ProjectManagement.Api;
            
class SnippetSubmitDeleteProjectRequest
{
    private static void SubmitDeleteProject(int businessUnitSid, int sqlInstanceSid, int projectSid)
    {
        ProjectManagementServiceClient projectClient = new ProjectManagementServiceClient();
        SubmitDeleteProjectRequest request = new SubmitDeleteProjectRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.ProjectSid = projectSid;
        SubmitDeleteProjectResponse response = projectClient.SubmitDeleteProject(request);
        if (response.Status.Code == StatusCode.Success)
        {
            if (response.ActivitySid == 0)
                Console.WriteLine("Delete Project Request successfully processed");
            else
                Console.WriteLine("Request successfully submitted with Activity SID: " + response.ActivitySid);
        }
    }
}
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