MoneyRecord.cpp
上传用户:shcaka8
上传日期:2013-04-06
资源大小:103k
文件大小:1k
- // MoneyRecord.cpp : implementation file
- //
- #include "stdafx.h"
- #include "MyAssistant.h"
- #include "MoneyRecord.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CMoneyRecord
- IMPLEMENT_DYNAMIC(CMoneyRecord, CRecordset)
- CMoneyRecord::CMoneyRecord(CDatabase* pdb)
- : CRecordset(pdb)
- {
- //{{AFX_FIELD_INIT(CMoneyRecord)
- m_ID = _T("");
- m_Type = _T("");
- m_Sum = 0;
- m_Comments = _T("");
- m_nFields = 5;
- //}}AFX_FIELD_INIT
- m_nDefaultType = snapshot;
- }
- CString CMoneyRecord::GetDefaultConnect()
- {
- return _T("ODBC;DSN=Assistant");
- }
- CString CMoneyRecord::GetDefaultSQL()
- {
- return _T("[Account]");
- }
- void CMoneyRecord::DoFieldExchange(CFieldExchange* pFX)
- {
- //{{AFX_FIELD_MAP(CMoneyRecord)
- pFX->SetFieldType(CFieldExchange::outputColumn);
- RFX_Text(pFX, _T("[ID]"), m_ID);
- RFX_Text(pFX, _T("[Type]"), m_Type);
- RFX_Long(pFX, _T("[Sum]"), m_Sum);
- RFX_Date(pFX, _T("[Date]"), m_Date);
- RFX_Text(pFX, _T("[Comments]"), m_Comments);
- //}}AFX_FIELD_MAP
- }
- /////////////////////////////////////////////////////////////////////////////
- // CMoneyRecord diagnostics
- #ifdef _DEBUG
- void CMoneyRecord::AssertValid() const
- {
- CRecordset::AssertValid();
- }
- void CMoneyRecord::Dump(CDumpContext& dc) const
- {
- CRecordset::Dump(dc);
- }
- #endif //_DEBUG