📄 allset.cpp
字号:
// AllSet.cpp : implementation file
//
#include "stdafx.h"
#include "DATABASE.h"
#include "AllSet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAllSet
IMPLEMENT_DYNAMIC(CAllSet, CRecordset)
CAllSet::CAllSet(CDatabase* pdb)
: CRecordset(pdb)
{
//{{AFX_FIELD_INIT(CAllSet)
m_stuid = _T("");
m_score1 = 0;
m_score2 = 0;
m_score3 = 0;
m_score4 = 0;
m_ave = 0.0f;
m_stuid2 = _T("");
m_year = 0;
m_reg = _T("");
m_native = _T("");
m_type = _T("");
m_birth = _T("");
m_class = _T("");
m_stuid3 = _T("");
m_name = _T("");
m_sex = _T("");
m_profcode = _T("");
m_address = _T("");
m_stuid4 = _T("");
m_credit = 0.0f;
m_lesson1 = _T("");
m_lesson2 = _T("");
m_lesson3 = _T("");
m_lesson4 = _T("");
m_score5 = 0;
m_score6 = 0;
m_score7 = 0;
m_score8 = 0;
m_nFields = 28;
//}}AFX_FIELD_INIT
m_nDefaultType = snapshot;
}
CString CAllSet::GetDefaultConnect()
{
return _T("ODBC;DSN=我的数据库0");
}
CString CAllSet::GetDefaultSQL()
{
return _T("[cj],[xj],[xs],[xx]");
}
void CAllSet::DoFieldExchange(CFieldExchange* pFX)
{
//{{AFX_FIELD_MAP(CAllSet)
pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Text(pFX, _T("[cj].[stuid]"), m_stuid);
RFX_Int(pFX, _T("[score1]"), m_score1);
RFX_Int(pFX, _T("[score2]"), m_score2);
RFX_Int(pFX, _T("[score3]"), m_score3);
RFX_Int(pFX, _T("[score4]"), m_score4);
RFX_Single(pFX, _T("[ave]"), m_ave);
RFX_Text(pFX, _T("[xj].[stuid]"), m_stuid2);
RFX_Int(pFX, _T("[year]"), m_year);
RFX_Text(pFX, _T("[reg]"), m_reg);
RFX_Text(pFX, _T("[native]"), m_native);
RFX_Text(pFX, _T("[type]"), m_type);
RFX_Text(pFX, _T("[birth]"), m_birth);
RFX_Text(pFX, _T("[class]"), m_class);
RFX_Text(pFX, _T("[xs].[stuid]"), m_stuid3);
RFX_Text(pFX, _T("[name]"), m_name);
RFX_Text(pFX, _T("[sex]"), m_sex);
RFX_Text(pFX, _T("[profcode]"), m_profcode);
RFX_Text(pFX, _T("[address]"), m_address);
RFX_Text(pFX, _T("[xx].[stuid]"), m_stuid4);
RFX_Single(pFX, _T("[credit]"), m_credit);
RFX_Text(pFX, _T("[lesson1]"), m_lesson1);
RFX_Text(pFX, _T("[lesson2]"), m_lesson2);
RFX_Text(pFX, _T("[lesson3]"), m_lesson3);
RFX_Text(pFX, _T("[lesson4]"), m_lesson4);
RFX_Int(pFX, _T("[score5]"), m_score5);
RFX_Int(pFX, _T("[score6]"), m_score6);
RFX_Int(pFX, _T("[score7]"), m_score7);
RFX_Int(pFX, _T("[score8]"), m_score8);
//}}AFX_FIELD_MAP
}
/////////////////////////////////////////////////////////////////////////////
// CAllSet diagnostics
#ifdef _DEBUG
void CAllSet::AssertValid() const
{
CRecordset::AssertValid();
}
void CAllSet::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -