2013-08-05 35 views
0

如何查詢QuickBooks以獲取具有該廠商的ListID的特定供應商的詳細信息? 我只有該供應商的ListID。我如何查詢ListID?我檢查了SDK並發現有IVendorQuery方法,可用於查詢特定供應商。但我找不到一種方法將ListID傳遞給該方法以獲取詳細信息。在QuickBooks中使用C#中的SDK檢索特定供應商的詳細信息,並提供該供應商的LIstID?

我目前所做的是從QuickBooks中檢索所有供應商,然後嘗試將他們的ListID與我需要使用for循環的ListID進行匹配。這是這樣的,

IMsgSetResponse responseMsgSet = sessionManager.DoRequests(requestMsgSet); 
IResponse response = responseMsgSet.ResponseList.GetAt(0); 
IVendorRetList vendorRetList = (IVendorRetList)response.Detail; 
if (vendorRetList != null) 
{ 
for (int j = 0; j < vendorRetList.Count; j++) 
{ 
    IVendorRet vendorRet = vendorRetList.GetAt(j); 
    if (dvVendors.GetRowCellValue(i, "ListID").ToString() == vendorRet.ListID.GetValue()) 
    { 
    strSeqId = vendorRet.EditSequence.GetValue(); 
    //code to edit that vendor using edit sequence id 
    } 
} 
} 

回答