Touchstone 11.0 API Reference
UpdateExposureView Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ProjectManagementServiceClient Class : UpdateExposureView Method
Contains an UpdateExposureViewRequest that identifies the updated properties of the Exposure View that you want to update, along with the associated Touchstone-generated Business Unit SID and SQL Instance SID.
Updates an existing Touchstone® Exposure View.
Syntax
Public Function UpdateExposureView( _
   ByVal request As UpdateExposureViewRequest _
) As UpdateExposureViewResponse
Dim instance As ProjectManagementServiceClient
Dim request As UpdateExposureViewRequest
Dim value As UpdateExposureViewResponse
 
value = instance.UpdateExposureView(request)

Parameters

request
Contains an UpdateExposureViewRequest that identifies the updated properties of the Exposure View that you want to update, along with the associated Touchstone-generated Business Unit SID and SQL Instance SID.

Return Value

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 update an Exposure View, perform the following steps:

  1. Get the Exposure View that you want to update by calling the GetExposureView() method.
  2. Update the Exposure View with the desired changes.
  3. Pass the updated Exposure View object from the previous step as part of the UpdateExposureViewRequest object for the UpdateExposureView() method.
Example
The following example shows how to update a Touchstone Exposure View using the UpdateExposureView() method:
using System;
using System.Collections.Generic;
using AIR.Services.Common.Data;
using AIR.Services.Common.Filter.Data;
using AIR.Services.ProjectManagement.Api;
using AIR.Services.ProjectManagement.Data;
            
class SnippetUpdateExposureViewRequest
{
    private static void UpdateExposureViewRequest(int businessUnitSid, int sqlInstanceSid, int exposureViewSid, List<Filter> filters)
    {
        ProjectManagementServiceClient projectClient = new ProjectManagementServiceClient();
        GetExposureViewRequest request = new GetExposureViewRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.ExposureViewSid = exposureViewSid;
        GetExposureViewResponse response = projectClient.GetExposureView(request);
        if (response.Status.Code == StatusCode.Success)
        {
            ExposureView expViewToUpdate = response.ExposureView;
            expViewToUpdate.Description += ". Updated by APIs at " + DateTime.Now.ToString("MMMM dd yyyy H mm ss");
            expViewToUpdate.Filters = filters;
            UpdateExposureViewRequest updateRequest = new UpdateExposureViewRequest();
            updateRequest.BusinessUnitSid = businessUnitSid;
            updateRequest.SqlInstanceSid = sqlInstanceSid;
            updateRequest.ExposureView = expViewToUpdate;
            UpdateExposureViewResponse updateResponse = projectClient.UpdateExposureView(updateRequest);
            if (updateResponse.Status.Code == StatusCode.Success)
                Console.WriteLine("Exposure View successfully updated!");
        }
    }
}
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