2013-10-30 54 views
0

我在IPP .Net V3中找到CDCQuery的文檔和對象,但似乎無法使其工作。如何執行IPP v3 CDCQuery?

這裏的我想要做什麼:

QueryService<Intuit.Ipp.Data.CDCQuery> myQueryService = new QueryService<Intuit.Ipp.Data.CDCQuery>(myServiceContext); 

DateTime updateDate = new DateTime(2013, 10, 30); 

var recs = myQueryService.Select(c => c).Where(c => c.ChangedSince > updateDate); 
foreach (var rec in recs) 
{ 
    // do something with the results... 
} 

想法?

回答

0

這就是爲我工作。

  // Not used, but shown anyway... 
      CDCQuery cdcQuery = new CDCQuery(); 
      cdcQuery.ChangedSince = dtUpper; 

      // This does the work... 
      DataService commonService = new DataService(context); 
      List<IEntity> lstEnt = new List<IEntity>(); 
      lstEnt.Add(new Customer()); 
      IntuitCDCResponse cdcResp = commonService.CDC(lstEnt, dtUpper); 
      if (cdcResp.entities.ContainsKey("Customer")) 
       foreach (Customer qboi in cdcResp.entities["Customer"]) 
       { 
       } 

問候

+0

完美的作品!非常感謝! –

相關問題