Touchstone Re 2023 API Reference
GetCurrencyExchangeRateInfo Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ProjectManagementServiceClient Class : GetCurrencyExchangeRateInfo Method
Contains a GetCurrencyExchangeRateInfoRequest that identifies the software-generated Business Unit Sequential Identifier (SID) and SQL Instance SID associated with the Currency Exchange Rate Information to retrieve.
Retrieves a list of Currency Exchange Rate Information in a given Business Unit and SQL Server Instance.
Syntax
Public Function GetCurrencyExchangeRateInfo( _
   ByVal request As GetCurrencyExchangeRateInfoRequest _
) As GetCurrencyExchangeRateInfoResponse
Dim instance As ProjectManagementServiceClient
Dim request As GetCurrencyExchangeRateInfoRequest
Dim value As GetCurrencyExchangeRateInfoResponse
 
value = instance.GetCurrencyExchangeRateInfo(request)
public GetCurrencyExchangeRateInfoResponse GetCurrencyExchangeRateInfo( 
   GetCurrencyExchangeRateInfoRequest request
)

Parameters

request
Contains a GetCurrencyExchangeRateInfoRequest that identifies the software-generated Business Unit Sequential Identifier (SID) and SQL Instance SID associated with the Currency Exchange Rate Information to retrieve.

Return Value

A GetCurrencyExchangeRateInfoResponse containing a list of Currency Exchange Rate Information associated with the specified SQL Server Instance and Business Unit.
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 retrieve a list of all the Currency Exchange Rate Information in a given Business Unit and SQL Server Instance using the GetCurrencyExchangeRateInfo() method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.ProjectManagement.Api;
using AIR.Services.ProjectManagement.Data;
            
class SnippetGetCurrencyExchangeRateInfoRequest
{
    private static void GetCurrencyExchangeRateInfoRequest(int businessUnitSid, int sqlInstanceSid)
    {
        ProjectManagementServiceClient projectClient = new ProjectManagementServiceClient();
        GetCurrencyExchangeRateInfoRequest request = new GetCurrencyExchangeRateInfoRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
            
        GetCurrencyExchangeRateInfoResponse response = projectClient.GetCurrencyExchangeRateInfo(request);
        if (response.Status.Code == StatusCode.Success)
        {
            foreach (CurrencyExchangeRateInfo rateInfo in response.CurrencyExchangeRateInfoList)
            {
                Console.WriteLine("Name: " + rateInfo.Name);
                Console.WriteLine("Sid: " + rateInfo.Sid);
                Console.WriteLine("Is AIR Standard? : " + rateInfo.IsAIRStandard);
                Console.WriteLine("Base Currency Code: " + rateInfo.BaseCurrencyCode);
                Console.WriteLine("           *******************************          ");
            }
        }
    }
}
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