Dossier::GetParameterValue (Interface: Dossier)
 
Gets the value of the given parameter.
 
VARIANT GetParameterValue (
    enum eParameter eParameter
)
 
Parameters
eParameter
[in] A value of the 'eParameter' enumeration.
 
Return value
A VARIANT containing the value of the parameter. The subtype of this VARIANT depends on the given enum value (see more details in eParameter).
 
Remarks
When the option related to the given parameter is not active in the dossier, an exception is thrown.
 
See Also
CreateDossierContext
 
Samples
 
C++
 
// Get the current VAT rates
COleVariant vVatRates = pDossier->GetParameterValue (parVatRates);
if (vVatRates.vt & VT_ARRAY)                // Check if the array is empty
{
    COleSafeArray saVatRates (vVatRates);    // Construct a Safe Array from the VARIANT
    VARIANT vVatRate;
    long lUB, lInd;

    saVatRates.GetUBound (1, &lUB);            // Get the upper bound of the array
    for (lInd = 0; lInd <= lUB; lInd++)
    {
        saVatRates.GetElement (&lInd, &vVatRate);
        // Process vVatRate
    }
}

// Get the frequence of the VAT declaration
BYTE byVatDeclarationFrequence = pDossier->GetParameterValue (parVatDeclarationFrequence).bVal;

C#
 
// Get the current VAT rates
Array aVatRates = (Array)oDossier.GetParameterValue (eParameter.parVatRates);

if (aVatRates != null)
{
    foreach (double lfRate in aVatRates)
    {
        // Process lfRate
    }
}

// Get the frequence of the VAT declaration
byte byVatDeclarationFrequence = (byte)oDossier.GetParameterValue (eParameter.parVatDeclarationFrequence);

VBS
 
Dim vVatRates, vVatRate, vVatDeclarationFrequence

' Get the current VAT rates
vVatRates = oDossier.GetParameterValue(parVatRates)
If Not IsEmpty(vVatRates) Then
    For Each vVatRate In vVatRates
        ' Process vVatRate
    Next
End If

' Get the frequence of the VAT declaration
vVatDeclarationFrequence = oDossier.GetParameterValue(parVatDeclarationFrequence)

VB.NET
 
Dim oVatRates, oVatRate, oVatDeclarationFrequence As Object

' Get the current VAT rates
oVatRates = oDossier.GetParameterValue(eParameter.parVatRates)
If Not IsNothing(oVatRates) Then
    For Each lfRate As Double In oVatRates
        ' Process lfRate
    Next
End If

' Get the frequence of the VAT declaration
oVatDeclarationFrequence = oDossier.GetParameterValue(eParameter.parVatDeclarationFrequence)