SQLDataHelper.h
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:1k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. // SQLDataHelper.h: interface for the CSQLDataHelper class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_SQLDATAHELPER_H__39DD3C0B_9D19_4855_8ABF_20A10C8D53DC__INCLUDED_)
  5. #define AFX_SQLDATAHELPER_H__39DD3C0B_9D19_4855_8ABF_20A10C8D53DC__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CSQLDataHelper  
  10. {
  11. public:
  12. CSQLDataHelper(CXTPCalendarData* pDataProvider, XTPADODB::_Connection* pDBconn);
  13. virtual ~CSQLDataHelper();
  14. static CString MakeRetrieveDayEventsSQL(COleDateTime dtDay);
  15. static CString MakeGetUpcomingEventsSQL(COleDateTime dtFrom, int nPeriodMinutes, BOOL bOptimized = TRUE);
  16. CXTPCalendarEventsPtr CreateEventsFromData(XTPADODB::_Recordset* pRSevents, BOOL bCloseRS);
  17. CXTPCalendarEventPtr CreateEventFromData(XTPADODB::_Recordset* pRSevent, BOOL bCloseRS);
  18. CXTPCalendarRecurrencePatternPtr CreatePatternFromData(XTPADODB::_Recordset* pRS);
  19. void PutEventToData(CXTPCalendarEvent* pEvent, XTPADODB::_Recordset* pRS);
  20. void PutPatternToData(CXTPCalendarRecurrencePattern* pPattern, XTPADODB::_Recordset* pRS);
  21. protected:
  22. CXTPCalendarEventPtr _CreateEventFromData(XTPADODB::_Recordset* pRSevents, BOOL bException);
  23. void ReadRPatternExceptions(CXTPCalendarRecurrencePattern* pPattern);
  24. private:
  25. CXTPCalendarData* m_pDataProvider;
  26. XTPADODB::_ConnectionPtr m_ptrDBconn;
  27. };
  28. #endif // !defined(AFX_SQLDATAHELPER_H__39DD3C0B_9D19_4855_8ABF_20A10C8D53DC__INCLUDED_)