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

对话框与窗口

开发平台:

Visual C++

  1. // CalendarDataProviderSQL.h: interface for the CCalendarDataProviderSQL class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_CALENDARDATAPROVIDERSQL_H__791386E5_71B5_4772_B063_74BF78CCB93F__INCLUDED_)
  5. #define AFX_CALENDARDATAPROVIDERSQL_H__791386E5_71B5_4772_B063_74BF78CCB93F__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "Calendar/XTPCalendarCustomDataProvider.h"
  10. class CCalendarDataProviderSQL : public CXTPCalendarCustomDataProvider
  11. {
  12. public:
  13. CCalendarDataProviderSQL();
  14. virtual ~CCalendarDataProviderSQL();
  15. virtual BOOL Open();
  16. virtual void Close();
  17. // Base functionality. 
  18. // Must be implemented. 
  19. virtual CXTPCalendarEventsPtr   DoRetrieveDayEvents(COleDateTime dtDay);
  20. virtual CXTPCalendarEventPtr                DoRead_Event(DWORD dwEventID);
  21. virtual BOOL DoCreate_Event (CXTPCalendarEvent* pEvent, DWORD& rdwNewEventID);
  22. virtual BOOL DoUpdate_Event (CXTPCalendarEvent* pEvent);
  23. virtual BOOL DoDelete_Event (CXTPCalendarEvent* pEvent);
  24. // Recurrence events support.
  25. virtual CXTPCalendarRecurrencePatternPtr    DoRead_RPattern(DWORD dwPatternID);
  26. virtual BOOL DoCreate_RPattern  (CXTPCalendarRecurrencePattern* pPattern, DWORD& rdwNewPatternID);
  27. virtual BOOL DoUpdate_RPattern  (CXTPCalendarRecurrencePattern* pPattern);
  28. virtual BOOL DoDelete_RPattern  (CXTPCalendarRecurrencePattern* pPattern);
  29. // Additional feature handlers. 
  30. // My be implement only if you need these feature.
  31. virtual CXTPCalendarEventsPtr DoGetUpcomingEvents(COleDateTime dtFrom, COleDateTimeSpan spPeriod);
  32. virtual CXTPCalendarEventsPtr DoGetAllEvents_raw();
  33. virtual void                  DoRemoveAllEvents();
  34. private:
  35. XTPADODB::_ConnectionPtr m_ptrDBconn;
  36. };
  37. #endif // !defined(AFX_CALENDARDATAPROVIDERSQL_H__791386E5_71B5_4772_B063_74BF78CCB93F__INCLUDED_)