PT.cpp
资源名称:PasRTDat.rar [点击查看]
上传用户:shtiemo
上传日期:2017-12-29
资源大小:163k
文件大小:2k
源码类别:
能源行业(电力石油煤炭)
开发平台:
Visual C++
- // PT.cpp : implementation file
- //
- #include "stdafx.h"
- #include "PasRTDat.h"
- #include "PT.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CPT
- IMPLEMENT_DYNAMIC(CPT, CRecordset)
- CPT::CPT(CDatabase* pdb)
- : CRecordset(pdb)
- {
- //{{AFX_FIELD_INIT(CPT)
- m_ID = 0;
- m_MingZi = _T("");
- m_VACoef = 1.0f;
- m_VAOffset = 0.0f;
- m_VBCoef = 1.0f;
- m_VBOffset = 0.0f;
- m_VCCoef = 1.0f;
- m_VCOffset = 0.0f;
- #ifdef NEW_SYSTEM
- m_VXABCoef = 1.0f;
- m_VXABOffset = 0.0f;
- m_VXBCCoef = 1.0f;
- m_VXBCOffset = 0.0f;
- m_VXCACoef = 1.0f;
- m_VXCAOffset = 0.0f;
- m_nFields = 14;
- #else
- m_VXCoef = 1.0f;
- m_VXOffset = 0.0f;
- m_nFields = 10;
- #endif
- //}}AFX_FIELD_INIT
- m_nDefaultType = snapshot;
- }
- CString CPT::GetDefaultConnect()
- {
- return _T("ODBC;DSN=Amiaoshu;UID=iES;PWD=iESApp;");
- }
- CString CPT::GetDefaultSQL()
- {
- return _T("PT");
- }
- void CPT::DoFieldExchange(CFieldExchange* pFX)
- {
- //{{AFX_FIELD_MAP(CPT)
- pFX->SetFieldType(CFieldExchange::outputColumn);
- RFX_Int(pFX, _T("ID"), m_ID);
- RFX_Text(pFX, _T("MingZi"), m_MingZi);
- RFX_Single(pFX, _T("VACoef"), m_VACoef);
- RFX_Single(pFX, _T("VAOffset"), m_VAOffset);
- RFX_Single(pFX, _T("VBCoef"), m_VBCoef);
- RFX_Single(pFX, _T("VBOffset"), m_VBOffset);
- RFX_Single(pFX, _T("VCCoef"), m_VCCoef);
- RFX_Single(pFX, _T("VCOffset"), m_VCOffset);
- #ifdef NEW_SYSTEM
- RFX_Single(pFX, _T("VABXCoef"), m_VXABCoef);
- RFX_Single(pFX, _T("VABXOffset"), m_VXABOffset);
- RFX_Single(pFX, _T("VBCXCoef"), m_VXBCCoef);
- RFX_Single(pFX, _T("VBCXOffset"), m_VXBCOffset);
- RFX_Single(pFX, _T("VCAXCoef"), m_VXCACoef);
- RFX_Single(pFX, _T("VCAXOffset"), m_VXCAOffset);
- #else
- RFX_Single(pFX, _T("VXCoef"), m_VXCoef);
- RFX_Single(pFX, _T("VXOffset"), m_VXOffset);
- #endif
- //}}AFX_FIELD_MAP
- }
- /////////////////////////////////////////////////////////////////////////////
- // CPT diagnostics
- #ifdef _DEBUG
- void CPT::AssertValid() const
- {
- CRecordset::AssertValid();
- }
- void CPT::Dump(CDumpContext& dc) const
- {
- CRecordset::Dump(dc);
- }
- #endif //_DEBUG