|
Seeks a Production Document Detail line by its document. |
|
|
VARIANT_BOOL SeekByDocument ( enum eSeekMode eSeekMode, BSTR bsBook, LONG lDocNum, SHORT sLineNum ) |
|
|
Key information | | This method uses key number 1 (See SwapKey). | | This is a unique key. |
| | Key segment information | | | Parameters | eSeekMode | [in] A value of the 'eSeekMode' enumeration. | bsBook | [in] The book code of the Production Document of which you want to seek a detail line. | lDocNum | [in] The document number of the Production Document of which you want to seek a detail line. | sLineNum | [in] The line number of the Production Document Detail line you want to seek. |
|
Remarks
|
|
This number is a 0-based index, i.e. it starts from 0. Therefore the value of this parameter is 1 less than the numbers shown in the Venice grids and 1 less than the value returned by the property vLine (see properties)! |
|
| Return value |
True if the record with the given properties was found, otherwise false. |
|
See Also |
|
|
|
Samples |
|
|
C++ |
|
// Seek the data of all detail lines of the production document with book code = 'ATEL1' and document number = 12
CString strBook = "ATEL1";
long lDocNum = 12;
pProductDet->SeekByDocument (smGreaterOrEqual, (LPCSTR)strBook, lDocNum, 0);
while (pProductDet->GetDBStatus () == 0 && (CString)pProductDet->pBook == strBook && (long)pProductDet->pDocNum == lDocNum)
{
// Process record data
pProductDet->GetNext ();
}
|
|
|
C# |
|
// Seek the data of all detail lines of the production document with book code = 'ATEL1' and document number = 12
string strBook = "ATEL1";
int iDocNum = 12;
oProductDet.SeekByDocument (eSeekMode.smGreaterOrEqual, strBook, iDocNum, 0);
while (oProductDet.GetDBStatus () == 0 && oProductDet.pBook.ToString () == strBook && (int)oProductDet.pDocNum == iDocNum)
{
// Process record data
oProductDet.GetNext ();
}
|
|
|
VBS |
|
' Seek the data of all detail lines of the production document with book code = 'ATEL1' and document number = 12
Dim strBook
Dim lDocNum
strBook = "ATEL1"
lDocNum = 12
Call oProductDet.SeekByDocument(smGreaterOrEqual, strBook, lDocNum, 0)
While oProductDet.GetDBStatus() = 0 And oProductDet.pBook = strBook And oProductDet.pDocNum = lDocNum
' Process record data
Call oProductDet.GetNext()
Wend
|
|
|
VB.NET |
|
' Seek the data of all detail lines of the production document with book code = 'ATEL1' and document number = 12
Dim strBook As String
Dim lDocNum As Long
strBook = "ATEL1"
lDocNum = 12
oProductDet.SeekByDocument(eSeekMode.smGreaterOrEqual, strBook, lDocNum, 0)
While oProductDet.GetDBStatus() = 0 And oProductDet.pBook = strBook And oProductDet.pDocNum = lDocNum
' Process record data
oProductDet.GetNext()
End While
|
|