home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / labs / c09 / lab01 / ex01 / employeedoc.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.5 KB  |  68 lines

  1. // EmployeeDoc.cpp : implementation of the CEmployeeDoc class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "EmployeePersonalSet.h"
  6. #include "EmployeePaySet.h"
  7. #include "Employee.h"
  8. #include "EmployeeDoc.h"
  9.  
  10.  
  11.  
  12. #ifdef _DEBUG
  13. #define new DEBUG_NEW
  14. #undef THIS_FILE
  15. static char THIS_FILE[] = __FILE__;
  16. #endif
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CEmployeeDoc
  20.  
  21. IMPLEMENT_DYNCREATE(CEmployeeDoc, CDocument)
  22.  
  23. BEGIN_MESSAGE_MAP(CEmployeeDoc, CDocument)
  24.     //{{AFX_MSG_MAP(CEmployeeDoc)
  25.         // NOTE - the ClassWizard will add and remove mapping macros here.
  26.         //    DO NOT EDIT what you see in these blocks of generated code!
  27.     //}}AFX_MSG_MAP
  28. END_MESSAGE_MAP()
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CEmployeeDoc construction/destruction
  32.  
  33. CEmployeeDoc::CEmployeeDoc()
  34.     : m_employeePaySet( & m_DB ), 
  35.         m_employeePersonalInfoSet( & m_DB )
  36. {
  37. }
  38.  
  39. CEmployeeDoc::~CEmployeeDoc()
  40. {
  41. }
  42.  
  43. BOOL CEmployeeDoc::OnNewDocument()
  44. {
  45.     if (!CDocument::OnNewDocument())
  46.         return FALSE;
  47.  
  48.     return TRUE;
  49. }
  50.  
  51. /////////////////////////////////////////////////////////////////////////////
  52. // CEmployeeDoc diagnostics
  53.  
  54. #ifdef _DEBUG
  55. void CEmployeeDoc::AssertValid() const
  56. {
  57.     CDocument::AssertValid();
  58. }
  59.  
  60. void CEmployeeDoc::Dump(CDumpContext& dc) const
  61. {
  62.     CDocument::Dump(dc);
  63. }
  64. #endif //_DEBUG
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67. // CEmployeeDoc commands
  68.