Updates an existing Touchstone®
Exposure View.
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!");
}
}
}
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