COURSSET.CPP
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:1k
源码类别:

Windows编程

开发平台:

Visual C++

  1. // coursset.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "enroll.h"
  5. #include "coursset.h"
  6. #ifdef _DEBUG
  7. #undef THIS_FILE
  8. static char BASED_CODE THIS_FILE[] = __FILE__;
  9. #endif
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CCourseSet
  12. IMPLEMENT_DYNAMIC(CCourseSet, CRecordset)
  13. CCourseSet::CCourseSet(CDatabase* pdb)
  14. : CRecordset(pdb)
  15. {
  16. //{{AFX_FIELD_INIT(CCourseSet)
  17. m_CourseID = _T("");
  18. m_CourseTitle = _T("");
  19. m_Hours = 0;
  20. m_nFields = 3;
  21. //}}AFX_FIELD_INIT
  22. }
  23. CString CCourseSet::GetDefaultConnect()
  24. {
  25. return _T("ODBC;DSN=Student Registration;");
  26. }
  27. CString CCourseSet::GetDefaultSQL()
  28. {
  29. return _T("COURSE");
  30. }
  31. void CCourseSet::DoFieldExchange(CFieldExchange* pFX)
  32. {
  33. //{{AFX_FIELD_MAP(CCourseSet)
  34. pFX->SetFieldType(CFieldExchange::outputColumn);
  35. RFX_Text(pFX, "CourseID", m_CourseID);
  36. RFX_Text(pFX, "CourseTitle", m_CourseTitle);
  37. RFX_Int(pFX, "Hours", m_Hours);
  38. //}}AFX_FIELD_MAP
  39. }
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CCourseSet diagnostics
  42. #ifdef _DEBUG
  43. void CCourseSet::AssertValid() const
  44. {
  45. CRecordset::AssertValid();
  46. }
  47. void CCourseSet::Dump(CDumpContext& dc) const
  48. {
  49. CRecordset::Dump(dc);
  50. }
  51. #endif //_DEBUG