home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / tutorial / enroll / step4 / coursset.cpp < prev    next >
C/C++ Source or Header  |  1998-03-26  |  1KB  |  58 lines

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