DAODepartmentSet.cpp
上传用户:benben_wyd
上传日期:2010-02-26
资源大小:1229k
文件大小:1k
源码类别:

书籍源码

开发平台:

Visual C++

  1. // DAODepartmentSet.cpp : implementation of the CDAODepartmentSet class
  2. //
  3. #include "stdafx.h"
  4. #include "DAODepartment.h"
  5. #include "DAODepartmentSet.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CDAODepartmentSet implementation
  13. IMPLEMENT_DYNAMIC(CDAODepartmentSet, CDaoRecordset)
  14. CDAODepartmentSet::CDAODepartmentSet(CDaoDatabase* pdb)
  15. : CDaoRecordset(pdb)
  16. {
  17. //{{AFX_FIELD_INIT(CDAODepartmentSet)
  18. m_DepartmentCode = _T("");
  19. m_DepartmentName = _T("");
  20. m_nFields = 2;
  21. //}}AFX_FIELD_INIT
  22. m_nDefaultType = dbOpenDynaset;
  23. }
  24. CString CDAODepartmentSet::GetDefaultDBName()
  25. {
  26. return _T("C:\My Documents\Visual C++\Classes.mdb");
  27. }
  28. CString CDAODepartmentSet::GetDefaultSQL()
  29. {
  30. return _T("[Department]");
  31. }
  32. void CDAODepartmentSet::DoFieldExchange(CDaoFieldExchange* pFX)
  33. {
  34. //{{AFX_FIELD_MAP(CDAODepartmentSet)
  35. pFX->SetFieldType(CDaoFieldExchange::outputColumn);
  36. DFX_Text(pFX, _T("[DepartmentCode]"), m_DepartmentCode);
  37. DFX_Text(pFX, _T("[DepartmentName]"), m_DepartmentName);
  38. //}}AFX_FIELD_MAP
  39. }
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CDAODepartmentSet diagnostics
  42. #ifdef _DEBUG
  43. void CDAODepartmentSet::AssertValid() const
  44. {
  45. CDaoRecordset::AssertValid();
  46. }
  47. void CDAODepartmentSet::Dump(CDumpContext& dc) const
  48. {
  49. CDaoRecordset::Dump(dc);
  50. }
  51. #endif //_DEBUG