ProjectDet::SeekByCtLink (Interface: ProjectDet)
 
Seeks a Project Detail by its contact-firm link.
 
VARIANT_BOOL SeekByCtLink (
    enum eSeekMode eSeekMode,
    LONG lCtcNum,
    enum eFirmType eFirmType,
    LONG lFrmNum,
    LONG lFrmSubNum,
    LONG lProject,
    SHORT sSeqNum
)
 
Key information
This method uses key number 2 (See SwapKey).
This is a unique key.
 
Key segment information
Segment NameTypeOrderCollation
pCtcNumLONG (unsigned)Ascending-
pFrmTypeBYTEAscending-
pFrmNumLONG (unsigned)Ascending-
pFrmSubNumLONG (unsigned)Ascending-
pProjectLONG (unsigned)Ascending-
pSeqNumSHORT (unsigned)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
lCtcNum
[in] The number of the contact that the project you want to seek is assigned to.
eFirmType
[in] A value of the 'eFirmType' enumeration.
lFrmNum
[in] The firm number of the project detail you want to seek.
lFrmSubNum
[in] The firm subnumber of the project detail you want to seek.
lProject
[in] The number of the project of which you want to seek a detail.
sSeqNum
[in] The sequence number of the project detail you want to seek.
 
See Also
CreateProjectDet
 
Samples
 
C++
 
// Seek all project details assigned to the contact with number 17, working for customer with number 12/0
long lCtcNum = 17, lFrmNum = 12, lFrmSubNum = 0;
eFirmType eFT = ftCustomer;
pProjectDet->SeekByCtLink (smGreater, lCtcNum, eFT, lFrmNum, lFrmSubNum, 0, 0);
while (pProjectDet->GetDBStatus () == 0 && (long)pProjectDet->pCtcNum == lCtcNum && pProjectDet->pFrmType.bVal == eFT && (long)pProjectDet->pFrmNum == lFrmNum && (long)pProjectDet->pFrmSubNum == lFrmSubNum)
{
    // Process record data
    
    pProjectDet->GetNext ();
}

C#
 
// Seek all project details assigned to the contact with number 17, working for customer with number 12/0
int iCtcNum = 17, iFrmNum = 12, iFrmSubNum = 0;
eFirmType eFT = eFirmType.ftCustomer;
oProjectDet.SeekByCtLink (eSeekMode.smGreater, iCtcNum, eFT, iFrmNum, iFrmSubNum, 0, 0);
while (oProjectDet.GetDBStatus () == 0 && (int)oProjectDet.pCtcNum == iCtcNum && (eFirmType)Enum.ToObject(typeof(eFirmType), oProjectDet.pFrmType) == eFT && (int)oProjectDet.pFrmNum == iFrmNum && (int)oProjectDet.pFrmSubNum == iFrmSubNum)
{
    // Process record data
    
    oProjectDet.GetNext ();
}

VBS
 
' Seek all project details assigned to the contact with number 17, working for customer with number 12/0
Dim dwCtcNum, dwFrmNum, dwFrmSubNum
Dim eFT
dwCtcNum = 17
dwFrmNum = 12
dwFrmSubNum = 0
eFT = ftCustomer
Call oProjectDet.SeekByCtLink(smGreater, dwCtcNum, eFT, dwFrmNum, dwFrmSubNum, 0, 0)
While oProjectDet.GetDBStatus() = 0 And oProjectDet.pCtcNum = dwCtcNum And oProjectDet.pFrmType = eFT And oProjectDet.pFrmNum = dwFrmNum And oProjectDet.pFrmSubNum = dwFrmSubNum
    ' Process record data

    Call oProjectDet.GetNext()
Wend

VB.NET
 
' Seek all project details assigned to the contact with number 17, working for customer with number 12/0
Dim ulCtcNum, ulFrmNum, ulFrmSubNum As ULong
Dim eFT As eFirmType
ulCtcNum = 17
ulFrmNum = 12
ulFrmSubNum = 0
eFT = eFirmType.ftCustomer
oProjectDet.SeekByCtLink(eSeekMode.smGreater, ulCtcNum, eFT, ulFrmNum, ulFrmSubNum, 0, 0)
While oProjectDet.GetDBStatus() = 0 And oProjectDet.pCtcNum = ulCtcNum And oProjectDet.pFrmType = eFT And oProjectDet.pFrmNum = ulFrmNum And oProjectDet.pFrmSubNum = ulFrmSubNum
    ' Process record data

    oProjectDet.GetNext()
End While