PayWork::Browse (Interface: PayWork)
 
Browses the work file for a Payment card.
 
LONG Browse (
    VARIANT_BOOL bFromCurrPos
)
 
Parameters
bFromCurrPos
[in] When this parameter is set to true the browse will use the current position of the file and the key that was set by the previous SeekBy-method. If the parameter is false the browse will be positioned at the beginning of the file and the key will be the last one that was manually selected in the browse.
 
Return value
A LONG containing the system number of the selected record, 0 if no record was selected.
 
Remarks
This method can only be used if user interface is allowed (parameter bWithUserInterface is set to true in the Logon method), because a record can only be selected using the browse dialog.
 
See Also
CreatePayWork
SeekByBankCode
 
Samples
 
C++
 
COleDateTime odtExpDate;
long lSysNum;
odtExpDate.SetDate (2024, 8, 28);
if (pPayWork->SeekByBankCode (smGreaterOrEqual, "BANK", odtExpDate))
    // Browse using the key 'PWK_BNK' (bank code) and positioned on the record found by SeekByBankCode
    lSysNum = pPayWork->Browse (VARIANT_TRUE);
else
    // Browse using the last key that was manually selected and positioned at the beginning of the file
    lSysNum = pPayWork->Browse (VARIANT_FALSE);

C#
 
DateTime dtExpDate = new DateTime (2024, 8, 28);
int iSysNum;
if (oPayWork.SeekByBankCode (eSeekMode.smGreaterOrEqual, "Bank", dtExpDate))
    // Browse using the key 'PWK_BNK' (bank code) and positioned on the record found by SeekByBankCode
    iSysNum = oPayWork.Browse (true);
else
    // Browse using the last key that was manually selected and positioned at the beginning of the file
    iSysNum = oPayWork.Browse (false);

VBS
 
Dim dtExpDate
Dim lSysNum
dtExpDate = #8/28/2024#
If oPayWork.SeekByBankCode(smGreatOrEqual, "Bank", dtExpDate) Then
    ' Browse using the key 'PWK_BNK' (bank code) and positioned on the record found by SeekByBankCode
    lSysNum = oPayWork.Browse(True)
Else
    ' Browse using the last key that was manually selected and positioned at the beginning of the file
    lSysNum = oPayWork.Browse(False)
End If

VB.NET
 
Dim dtExpDate As Date
Dim lSysNum As Long
dtExpDate = #8/28/2024#
If oPayWork.SeekByBankCode(eSeekMode.smGreaterOrEqual, "BANK", dtExpDate) Then
    ' Browse using the key 'PWK_BNK' (bank code) and positioned on the record found by SeekByBankCode
    lSysNum = oPayWork.Browse(True)
Else
    ' Browse using the last key that was manually selected and positioned at the beginning of the file
    lSysNum = oPayWork.Browse(False)
End If