|
Gets a distribution of a detail. |
|
|
VARIANT_BOOL GetStkDetail ( SHORT sDetIndex, SHORT sStkIndex, VARIANT* pvQuantity, VARIANT* pvLocation, VARIANT* pvSerialNumber ) |
|
|
Parameters | sDetIndex | [in] The index of the detail where the distribution belongs to, starting from 0. | sStkIndex | [in] The index of the distribution, starting from 0. | pvQuantity | [out] Returns a VARIANT, subtype DOUBLE, containing the quantity that is distributed. | pvLocation | [out] Returns a VARIANT, subtype BSTR, containing the location of the article. | pvSerialNumber | [out] Returns a VARIANT, subtype BSTR, containing the serial number of the article. | | Return value |
True if the distribution with the given index exists, otherwise false. |
|
See Also |
|
|
|
Samples |
|
|
C++ |
|
// Retrieve all distributions of all details of the current document
VARIANT vQuantity, vLocation, vSerialNumber;
short sNumDetails, sNumStkDets;
pSDeliv->PrepareDocument (paView);
sNumDetails = pSDeliv->GetNumDetails ();
for (short sDetail = 0; sDetail < sNumDetails; sDetail++)
{
sNumStkDets = pSDeliv->GetNumStkDetails (sDetail);
for (short sStkDet = 0; sStkDet < sNumStkDets; sStkDet++)
{
if (pSDeliv->GetStkDetail (sDetail, sStkDet, &vQuantity, &vLocation, &vSerialNumber))
{
// Process data
}
}
}
pSDeliv->CancelDocument ();
|
|
|
C# |
|
// Retrieve all distributions of all details of the current document
object oQuantity, oLocation, oSerialNumber;
short sNumDetails, sNumStkDets;
oSDeliv.PrepareDocument (ePrepareAction.paView);
sNumDetails = oSDeliv.GetNumDetails ();
for (short sDetail = 0; sDetail < sNumDetails; sDetail++)
{
sNumStkDets = oSDeliv.GetNumStkDetails (sDetail);
for (short sStkDet = 0; sStkDet < sNumStkDets; sStkDet++)
{
if (oSDeliv.GetStkDetail (sDetail, sStkDet, out oQuantity, out oLocation, out oSerialNumber))
{
// Process data
}
}
}
oSDeliv.CancelDocument ();
|
|
|
VBS |
|
' Retrieve all distributions of all details of the current document
Dim oQuantity, oLocation, oSerialNumber
Dim sDetail, sStkDet, sNumDetails, sNumStkDets
Call oSDeliv.PrepareDocument(paView)
sNumDetails = oSDeliv.GetNumDetails()
For sDetail = 0 To sNumDetails - 1
sNumStkDets = oSDeliv.GetNumStkDetails(sDetail)
For sStkDet = 0 To sNumStkDets - 1
If oSDeliv.GetStkDetail(sDetail, sStkDet, oQuantity, oLocation, oSerialNumber) Then
' Process data
End If
Next
Next
Call oSDeliv.CancelDocument()
|
|
|
VB.NET |
|
' Retrieve all distributions of all details of the current document
Dim oQuantity, oLocation, oSerialNumber As Object
Dim sNumDetails, sNumStkDets As Short
oSDeliv.PrepareDocument(ePrepareAction.paView)
sNumDetails = oSDeliv.GetNumDetails()
For sDetail As Short = 0 To sNumDetails - 1
sNumStkDets = oSDeliv.GetNumStkDetails(sDetail)
For sStkDet As Short = 0 To sNumStkDets - 1
If oSDeliv.GetStkDetail(sDetail, sStkDet, oQuantity, oLocation, oSerialNumber) Then
' Process data
End If
Next
Next
oSDeliv.CancelDocument()
|
|