我看到了这个链接 ,我注意到我们有同样的问题,他的问题仍然没有答案尚未。
这是个问题。
public class ServiceSel
{
public void GetCheqe()
{
bool sessionBegun = false;
bool connectionOpen = false;
QBSessionManager rp = null;
try
{
rp = new QBSessionManager();
IMsgSetRequest requestMsgSet = rp.CreateMsgSetRequest("US", 8, 0);
requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue;
rp.OpenConnection("Database Path File QuickBooks", "QuickBooks Integration Demo");
connectionOpen = true;
rp.BeginSession("", ENOpenMode.omDontCare);
sessionBegun = true;
ICheckQuery checkQuery = requestMsgSet.AppendCheckQueryRq();
IMsgSetResponse msgSetRs = rp.DoRequests(requestMsgSet);
IResponse response = msgSetRs.ResponseList.GetAt(0);
ICheckRetList checkRetList = (ICheckRetList)response.Detail;
if (checkRetList != null)
{
for (int i = 0; i < checkRetList.Count; i++)
{
ICheckRet checkRet = checkRetList.GetAt(i);
//Bank Account On top
string TxnID = checkRet.TxnID.GetValue().ToString(); //Data correct
string TxnNumber = checkRet.TxnNumber.GetValue().ToString(); //Data correct
string Account = checkRet.AccountRef.FullName.GetValue(); //Data correct
string Amount = checkRet.Amount.GetValue().ToString(); //Data correct
if (checkRet.ExpenseLineRetList != null)
{
Error checkRet.Expense Show null Data But in quickbooks have many data expense in calendar
}
}
}
}
catch (Exception ex)
{
//MessageBox.Show(ex.Message, "Error");
}
finally
{
if (sessionBegun)
{
rp.EndSession();
}
if (connectionOpen)
{
rp.CloseConnection();
}
}
}
为什么ExpenseLineRetList为空?