home *** CD-ROM | disk | FTP | other *** search
- // DAOEMdoc.h : interface of the CDAOEMPDoc class
- //
- /////////////////////////////////////////////////////////////////////////////
-
- class CDAOEMPDoc : public COleDocument
- {
- protected: // create from serialization only
- CDAOEMPDoc();
- DECLARE_DYNCREATE(CDAOEMPDoc)
-
- // Attributes
- public:
- CdbRecordset m_cEmpRecordSet;
- BOOL m_bConnected;
- BOOL m_bEmptyTable;
- protected:
- CdbDBEngine m_cDBEngine;
- CdbDatabase m_cEmpDatabase;
- CdbBookmark m_cLastGoodRecord;
-
- // Operations
- public:
- BOOL ConnectToDatabase(); //Opens a database
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CDAOEMPDoc)
- public:
- virtual BOOL OnNewDocument();
- //}}AFX_VIRTUAL
-
- // Implementation
- public:
- virtual ~CDAOEMPDoc();
- virtual void Serialize(CArchive& ar); // overridden for document i/o
- BOOL OKToMove();
-
- void UpdateEmpRec(long m_nEmpNum, LPCTSTR lpszFirstName,
- LPCTSTR lpszHomePhone, LPCTSTR lpszLastName,
- LPCTSTR lpszNotes, DATE HireDate);
-
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
-
- protected:
-
- // Generated message map functions
- protected:
- //{{AFX_MSG(CDAOEMPDoc)
- afx_msg void OnEditNext();
- afx_msg void OnEditPrevious();
- afx_msg void OnEditAdd();
- afx_msg void OnEditDelete();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
-
- /////////////////////////////////////////////////////////////////////////////
- // Employee table field indices
-
- // DAO classes support numbered or named indexes so uncomment whichever set
- // you prefer...
-
- //#define EMP_EMPLOYEE_ID 0L // Must use LONG or compiler gets confused with NULL
- //#define EMP_LAST_NAME 1
- //#define EMP_FIRST_NAME 2
- //#define EMP_TITLE 3
- //#define EMP_BIRTH_DATE 4
- //#define EMP_HIRE_DATE 5
- //#define EMP_ADDRESS 6
- //#define EMP_CITY 7
- //#define EMP_REGION 8
- //#define EMP_POSTAL_CODE 9
- //#define EMP_COUNTRY 10
- //#define EMP_HOME_PHONE 11
- //#define EMP_EXTENSION 12
- //#define EMP_PHOTO 13
- //#define EMP_NOTES 14
- //#define EMP_REPORTS_TO 15
-
- #define EMP_EMPLOYEE_ID _T("EmployeeID")
- #define EMP_LAST_NAME _T("LastName")
- #define EMP_FIRST_NAME _T("FirstName")
- #define EMP_TITLE _T("Title")
- #define EMP_BIRTH_DATE _T("BirthDate")
- #define EMP_HIRE_DATE _T("HireDate")
- #define EMP_ADDRESS _T("Address")
- #define EMP_CITY _T("City")
- #define EMP_REGION _T("Region")
- #define EMP_POSTAL_CODE _T("Postal Code")
- #define EMP_COUNTRY _T("Country")
- #define EMP_HOME_PHONE _T("HomePhone")
- #define EMP_EXTENSION _T("Extension")
- #define EMP_PHOTO _T("Photo")
- #define EMP_NOTES _T("Notes")
- #define EMP_REPORTS_TO _T("ReportsTo")
-