MoneyRecord.cpp
上传用户:shcaka8
上传日期:2013-04-06
资源大小:103k
文件大小:1k
源码类别:

家庭/个人应用

开发平台:

Visual C++

  1. // MoneyRecord.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "MyAssistant.h"
  5. #include "MoneyRecord.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CMoneyRecord
  13. IMPLEMENT_DYNAMIC(CMoneyRecord, CRecordset)
  14. CMoneyRecord::CMoneyRecord(CDatabase* pdb)
  15. : CRecordset(pdb)
  16. {
  17. //{{AFX_FIELD_INIT(CMoneyRecord)
  18. m_ID = _T("");
  19. m_Type = _T("");
  20. m_Sum = 0;
  21. m_Comments = _T("");
  22. m_nFields = 5;
  23. //}}AFX_FIELD_INIT
  24. m_nDefaultType = snapshot;
  25. }
  26. CString CMoneyRecord::GetDefaultConnect()
  27. {
  28. return _T("ODBC;DSN=Assistant");
  29. }
  30. CString CMoneyRecord::GetDefaultSQL()
  31. {
  32. return _T("[Account]");
  33. }
  34. void CMoneyRecord::DoFieldExchange(CFieldExchange* pFX)
  35. {
  36. //{{AFX_FIELD_MAP(CMoneyRecord)
  37. pFX->SetFieldType(CFieldExchange::outputColumn);
  38. RFX_Text(pFX, _T("[ID]"), m_ID);
  39. RFX_Text(pFX, _T("[Type]"), m_Type);
  40. RFX_Long(pFX, _T("[Sum]"), m_Sum);
  41. RFX_Date(pFX, _T("[Date]"), m_Date);
  42. RFX_Text(pFX, _T("[Comments]"), m_Comments);
  43. //}}AFX_FIELD_MAP
  44. }
  45. /////////////////////////////////////////////////////////////////////////////
  46. // CMoneyRecord diagnostics
  47. #ifdef _DEBUG
  48. void CMoneyRecord::AssertValid() const
  49. {
  50. CRecordset::AssertValid();
  51. }
  52. void CMoneyRecord::Dump(CDumpContext& dc) const
  53. {
  54. CRecordset::Dump(dc);
  55. }
  56. #endif //_DEBUG