home *** CD-ROM | disk | FTP | other *** search
/ Looney Tunes Photo Fun / LooneyTunesPhotoFun.iso / Daosdk / DISK4 / DAOSDK.1 / daoemdoc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-06  |  2.6 KB  |  99 lines

  1. // DAOEMdoc.h : interface of the CDAOEMPDoc class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CDAOEMPDoc : public COleDocument
  6. {
  7. protected: // create from serialization only
  8.     CDAOEMPDoc();
  9.     DECLARE_DYNCREATE(CDAOEMPDoc)
  10.  
  11. // Attributes
  12. public:
  13.     CdbRecordset    m_cEmpRecordSet;
  14.     BOOL            m_bConnected;
  15.     BOOL            m_bEmptyTable;
  16. protected:
  17.     CdbDBEngine        m_cDBEngine;
  18.     CdbDatabase        m_cEmpDatabase;
  19.     CdbBookmark        m_cLastGoodRecord;
  20.  
  21. // Operations
  22. public:
  23.     BOOL ConnectToDatabase(); //Opens a database 
  24.  
  25. // Overrides
  26.     // ClassWizard generated virtual function overrides
  27.     //{{AFX_VIRTUAL(CDAOEMPDoc)
  28.     public:
  29.     virtual BOOL OnNewDocument();
  30.     //}}AFX_VIRTUAL
  31.  
  32. // Implementation
  33. public:
  34.     virtual ~CDAOEMPDoc();
  35.     virtual void Serialize(CArchive& ar);   // overridden for document i/o
  36.     BOOL OKToMove();
  37.  
  38.     void UpdateEmpRec(long m_nEmpNum, LPCTSTR lpszFirstName, 
  39.             LPCTSTR lpszHomePhone, LPCTSTR lpszLastName,    
  40.             LPCTSTR lpszNotes, DATE HireDate);
  41.  
  42. #ifdef _DEBUG
  43.     virtual void AssertValid() const;
  44.     virtual void Dump(CDumpContext& dc) const;
  45. #endif
  46.  
  47. protected:
  48.  
  49. // Generated message map functions
  50. protected:
  51.     //{{AFX_MSG(CDAOEMPDoc)
  52.     afx_msg void OnEditNext();
  53.     afx_msg void OnEditPrevious();
  54.     afx_msg void OnEditAdd();
  55.     afx_msg void OnEditDelete();
  56.     //}}AFX_MSG
  57.     DECLARE_MESSAGE_MAP()
  58. };
  59.  
  60. /////////////////////////////////////////////////////////////////////////////
  61. // Employee table field indices
  62.  
  63. // DAO classes support numbered or named indexes so uncomment whichever set
  64. // you prefer...
  65.  
  66. //#define    EMP_EMPLOYEE_ID    0L // Must use LONG or compiler gets confused with NULL
  67. //#define    EMP_LAST_NAME    1
  68. //#define    EMP_FIRST_NAME    2
  69. //#define    EMP_TITLE        3
  70. //#define    EMP_BIRTH_DATE    4
  71. //#define    EMP_HIRE_DATE    5
  72. //#define    EMP_ADDRESS        6
  73. //#define    EMP_CITY        7
  74. //#define    EMP_REGION        8
  75. //#define    EMP_POSTAL_CODE    9
  76. //#define    EMP_COUNTRY        10
  77. //#define    EMP_HOME_PHONE    11
  78. //#define    EMP_EXTENSION    12
  79. //#define    EMP_PHOTO        13
  80. //#define    EMP_NOTES        14
  81. //#define    EMP_REPORTS_TO    15
  82.  
  83. #define EMP_EMPLOYEE_ID    _T("EmployeeID")
  84. #define    EMP_LAST_NAME    _T("LastName")
  85. #define    EMP_FIRST_NAME    _T("FirstName")
  86. #define    EMP_TITLE        _T("Title")
  87. #define    EMP_BIRTH_DATE    _T("BirthDate")
  88. #define EMP_HIRE_DATE    _T("HireDate")
  89. #define EMP_ADDRESS        _T("Address")
  90. #define EMP_CITY        _T("City")
  91. #define EMP_REGION        _T("Region")
  92. #define EMP_POSTAL_CODE    _T("Postal Code")
  93. #define EMP_COUNTRY        _T("Country")
  94. #define EMP_HOME_PHONE    _T("HomePhone")
  95. #define EMP_EXTENSION    _T("Extension")
  96. #define EMP_PHOTO        _T("Photo")
  97. #define EMP_NOTES        _T("Notes")
  98. #define EMP_REPORTS_TO    _T("ReportsTo")
  99.