📄 score.h
字号:
// Score.h: interface for the CScore class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SCORE_H__C1E40F23_7B1A_4A0F_BEC3_2D2DF9F98319__INCLUDED_)
#define AFX_SCORE_H__C1E40F23_7B1A_4A0F_BEC3_2D2DF9F98319__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CScore
{
public:
CScore();
CScore(int nYear, const CString& strNumber);
virtual ~CScore();
CScore(const CScore&);
CScore& operator = (const CScore&);
static CScore CreateInst(CString strSql);
static BOOL Create(CScore& );
static BOOL Update(CScore& );
static BOOL Delete(CScore& );
static BOOL Delete(const CString& strWhere);
BOOL Create(BOOL bUpdate = FALSE);
BOOL Update();
BOOL Delete();
void SetYear(int nYear) {
m_nYear = nYear;
}
int GetYear() const {
return m_nYear;
}
void SetNumber(const CString& strNumber) {
m_strNumber = strNumber;
}
CString GetNumber() const {
return m_strNumber;
}
void SetTheme(int nTheme) {
m_nTheme = nTheme;
}
int GetTheme() const {
return m_nTheme;
}
void SetCheck(int nCheck) {
m_nCheck = nCheck;
}
int GetCheck() const {
return m_nCheck;
}
void SetTeacher(int nTeacher) {
m_nTeacher = nTeacher;
// if( m_nTeacher > 0 && m_nComment > 0 && m_nAnswer > 0 )
// m_nScore = int(0.5*float(m_nTeacher) + 0.2*float(m_nComment) + 0.3*float(m_nAnswer) + 0.5);
}
int GetTeacher() const {
return m_nTeacher;
}
void SetComment(int nComment) {
m_nComment = nComment;
}
int GetComment() const {
return m_nComment;
}
void SetAnswer(int nAnswer) {
m_nAnswer = nAnswer;
}
int GetAnswer() const {
return m_nAnswer;
}
void SetScore(int nScore) {
m_nScore = nScore;
}
int GetScore() const {
return m_nScore;
}
protected:
int m_nYear;
CString m_strNumber;
int m_nTheme;
int m_nCheck;
int m_nTeacher;
int m_nComment;
int m_nAnswer;
int m_nScore;
};
#endif // !defined(AFX_SCORE_H__C1E40F23_7B1A_4A0F_BEC3_2D2DF9F98319__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -