|
Seeks a Purchase Invoice Detail line by its group code. |
|
|
VARIANT_BOOL SeekByGrpCod ( enum eSeekMode eSeekMode, BSTR bsGroupCode, DATE dDocDate, BSTR bsBook, LONG lDocNum, SHORT sLineNum ) |
|
|
Key information | | This method uses key number 8 (See SwapKey). | | This is a unique key. |
| | Key segment information | Segment Name | Type | Order | Collation | pGroupCode | BSTR | Ascending | Hierarchy | pDocDate | DATE (date) | Ascending | - | pBook | BSTR | Ascending | Case insensitive | pDocNum | LONG (unsigned) | Ascending | - | pLineNum | SHORT (unsigned) | Ascending | - |
| | Parameters | eSeekMode | [in] A value of the 'eSeekMode' enumeration. | bsGroupCode | [in] The group code of the Purchase Invoice of which you want to seek a detail line. | dDocDate | [in] The document date of the Purchase Invoice of which you want to seek a detail line. | bsBook | [in] The book code of the Purchase Invoice of which you want to seek a detail line. | lDocNum | [in] The document number of the Purchase Invoice of which you want to seek a detail line. | sLineNum | [in] The line number of the Purchase Invoice 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 all purchase invoices with a group code of 'GROUP'
CString strGroup = "GROUP";
pPInvceDet->SeekByGrpCod (smGreaterOrEqual, (LPCSTR)strGroup, COleDateTime (0, 0, 0, 0, 0, 0).m_dt, "", 0, 0);
while (pPInvceDet->GetDBStatus () == 0 && (CString)pPInvceDet->pGroupCode == strGroup)
{
// Process record data
pPInvceDet->GetNext ();
}
|
|
|
C# |
|
// Seek the data of all detail lines of all purchase invoices with a group code of 'GROUP'
string strGroup = "GROUP";
oPInvceDet.SeekByGrpCod (eSeekMode.smGreaterOrEqual, strGroup, new DateTime (), "", 0, 0);
while (oPInvceDet.GetDBStatus () == 0 && oPInvceDet.pGroupCode.ToString () == strGroup)
{
// Process record data
oPInvceDet.GetNext ();
}
|
|
|
VBS |
|
' Seek the data of all detail lines of all purchase invoices with a group code of 'GROUP'
Dim strGroup
Dim dtDocDate
strGroup = "GROUP"
Call oPInvceDet.SeekByGrpCod(smGreaterOrEqual, strGroup, dtDocDate, "", 0, 0)
While oPInvceDet.GetDBStatus() = 0 And oPInvceDet.pGroupCode = strGroup
' Process record data
Call oPInvceDet.GetNext()
Wend
|
|
|
VB.NET |
|
' Seek the data of all detail lines of all purchase invoices with a group code of 'GROUP'
Dim strGroup As String
Dim dtDocDate As Date
strGroup = "GROUP"
oPInvceDet.SeekByGrpCod(eSeekMode.smGreaterOrEqual, strGroup, dtDocDate, "", 0, 0)
While oPInvceDet.GetDBStatus() = 0 And oPInvceDet.pGroupCode = strGroup
' Process record data
oPInvceDet.GetNext()
End While
|
|