StValDet::SeekByWrhCod (Interface: StValDet)
 
Seeks a Stock Valuation Detail by its warehouse code.
 
VARIANT_BOOL SeekByWrhCod (
    enum eSeekMode eSeekMode,
    DATE dEndDate,
    BSTR bsWarehouse,
    BSTR bsArtNum
)
 
Key information
This is a unique key.
 
Key segment information
Segment NameTypeOrderCollation
pEndDateDATE (date)Ascending-
pWarehouseBSTRAscendingCase insensitive
pArtNumBSTRAscendingHierarchy
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
dEndDate
[in] The end date of the stock valuation detail you want to seek.
bsWarehouse
[in] The warehouse code of the stock valuation detail you want to seek.
bsArtNum
[in] The article number of the stock valuation detail you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateStValDet
 
Samples
 
C++
 
// Seek all stock valuation details for warehouse 'WRH' for the valuation that ended on 15/06/2024
COleDateTime odtEndDate;
CString strWarehouse = "WRH";

odtEndDate.SetDate (2024, 6, 15);

pStValDet->SeekByWrhCod (smGreater, odtEndDate, (LPCSTR)strWarehouse, "");
while (pStValDet->GetDBStatus () == 0 && (DATE)pStValDet->pEndDate == odtEndDate && (CString)pStValDet->pWarehouse == strWarehouse)
{
    // Process record data
    
    pStValDet->GetNext ();
}

C#
 
// Seek all stock valuation details for warehouse 'WRH' for the valuation that ended on 15/06/2024
DateTime dtEndDate = new DateTime (2024, 6, 15);
string strWarehouse = "WRH";

oStValDet.SeekByWrhCod (eSeekMode.smGreater, dtEndDate, strWarehouse, "");
while (oStValDet.GetDBStatus () == 0 && (DateTime)oStValDet.pEndDate == dtEndDate && oStValDet.pWarehouse.ToString () == strWarehouse)
{
    // Process record data
    
    oStValDet.GetNext ();
}

VBS
 
' Seek all stock valuation details for warehouse 'WRH' for the valuation that ended on 15/06/2024
Dim dtEndDate
Dim sWarehouse

dtEndDate = #6/15/2024#
sWarehouse = "WRH"

Call oStValDet.SeekByWrhCod(smGreater, dtEndDate, sWarehouse, "")
While oStValDet.GetDBStatus() = 0 And oStValDet.pEndDate = dtEndDate And oStValDet.pWarehouse = sWarehouse
    ' Process record data

    Call oStValDet.GetNext()
Wend

VB.NET
 
' Seek all stock valuation details for warehouse 'WRH' for the valuation that ended on 15/06/2024
Dim dtEndDate As Date
Dim sWarehouse As String

dtEndDate = #6/28/2024#
sWarehouse = "WRH"

oStValDet.SeekByWrhCod(eSeekMode.smGreater, dtEndDate, sWarehouse, "")
While oStValDet.GetDBStatus() = 0 And oStValDet.pEndDate = dtEndDate And oStValDet.pWarehouse = sWarehouse
    ' Process record data

    oStValDet.GetNext()
End While