POffer::SeekByDocDate (Interface: POffer)
 
Seeks a Purchase Offer by its document date.
 
VARIANT_BOOL SeekByDocDate (
    enum eSeekMode eSeekMode,
    DATE dDocDate,
    LONG lSysNum
)
 
Key information
This method uses key number 4 (See SwapKey).
This is a unique key.
 
Key segment information
Segment NameTypeOrderCollation
pDocDateDATE (date)Ascending-
pSysNumLONGAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
dDocDate
[in] The document date of the Purchase Offer you want to seek.
lSysNum
[in] The system number of the Purchase Offer you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreatePOffer
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek all the purchase offers with document date = 28/06/2024
COleDateTime odtDocDate;
odtDocDate.SetDate (2024, 6, 28);
pPOffer->SeekByDocDate (smGreaterOrEqual, odtDocDate, 0);
while (pPOffer->GetDBStatus () == 0 && (DATE)pPOffer->pDocDate == odtDocDate)
{
    // Process record data

    pPOffer->GetNext ();
}

C#
 
// Seek all the purchase offers with document date = 28/06/2024
DateTime dtDocDate = new DateTime (2024, 6, 28);
oPOffer.SeekByDocDate (eSeekMode.smGreaterOrEqual, dtDocDate, 0);
while (oPOffer.GetDBStatus () == 0 && (DateTime)oPOffer.pDocDate == dtDocDate)
{
    // Process record data

    oPOffer.GetNext ();
}

VBS
 
' Seek all the purchase offers with document date = 28/06/2024
Dim dtDocDate
dtDocDate = #6/28/2024#
Call oPOffer.SeekByDocDate(smGreaterOrEqual, dtDocDate, 0)
While oPOffer.GetDBStatus() = 0 And oPOffer.pDocDate = dtDocDate
    ' Process record data

    Call oPOffer.GetNext()
Wend

VB.NET
 
' Seek all the purchase offers with document date = 28/06/2024
Dim dtDocDate As Date
dtDocDate = #6/28/2024#
oPOffer.SeekByDocDate(eSeekMode.smGreaterOrEqual, dtDocDate, 0)
While oPOffer.GetDBStatus() = 0 And oPOffer.pDocDate = dtDocDate
    ' Process record data

    oPOffer.GetNext()
End While