PayWork::SeekByBenName (Interface: PayWork)
 
Seeks a Payment card in the work file by its beneficiary name.
 
VARIANT_BOOL SeekByBenName (
    enum eSeekMode eSeekMode,
    BSTR bsBenName,
    DATE dExpDate
)
 
Key information
This method uses key number 3 (See SwapKey).
This key allows duplicates.
 
Key segment information
Segment NameTypeOrderCollation
pBenNameBSTRAscendingCase insensitive
pExpDateDATE (date)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsBenName
[in] The name of the beneficiary of the payment you want to seek.
dExpDate
[in] The expiration date of the payment you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreatePayWork
 
Samples
 
C++
 
// Seek all payments in the working file for the beneficiary with name 'Beneficiary' and an expiration date greater than or equal to 28/08/2024
COleDateTime odtExpDate;
odtExpDate.SetDate (2024, 8, 28);
pPayWork->SeekByBenName (smGreaterOrEqual, "Beneficiary", odtExpDate);
while (pPayWork->GetDBStatus () == 0 && (CString)pPayWork->pBenName == "Beneficiary" && (DATE)pPayWork->pExpDate >= odtExpDate)
{
    // Process record data
    
    pPayWork->GetNext ();
}

C#
 
// Seek all payments in the working file for the beneficiary with name 'Beneficiary' and an expiration date greater than or equal to 28/08/2024
DateTime dtExpDate = new DateTime (2024, 8, 28);
oPayWork.SeekByBenName (eSeekMode.smGreaterOrEqual, "Beneficiary", dtExpDate);
while (oPayWork.GetDBStatus () == 0 && oPayWork.pBenName.ToString () == "Beneficiary" && (DateTime)oPayWork.pExpDate >= dtExpDate)
{
    // Process record data
    
    oPayWork.GetNext ();
}

VBS
 
' Seek all payments in the working file for the beneficiary with name 'Beneficiary' and an expiration date greater than or equal to 28/08/2024
Dim dtExpDate
dtExpDate = #8/28/2024#
Call oPayWork.SeekByBenName(smGreaterOrEqual, "Beneficiary", dtExpDate)
While oPayWork.GetDBStatus() = 0 And oPayWork.pBenName = "Beneficiary" And oPayWork.pExpDate >= dtExpDate
    ' Process record data

    Call oPayWork.GetNext()
Wend

VB.NET
 
' Seek all payments in the working file for the beneficiary with name 'Beneficiary' and an expiration date greater than or equal to 28/08/2024
Dim dtExpDate As Date
dtExpDate = #8/28/2024#
oPayWork.SeekByBenName(eSeekMode.smGreaterOrEqual, "Beneficiary", dtExpDate)
While oPayWork.GetDBStatus() = 0 And oPayWork.pBenName = "Beneficiary" And oPayWork.pExpDate >= dtExpDate
    ' Process record data

    oPayWork.GetNext()
End While