📄 readerhistory.cpp
字号:
// ReaderHistory.cpp : implementation file
//
#include "stdafx.h"
#include "Library.h"
#include "ReaderHistory.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CReader ReaderUser;
///////////////////////////////////////////////////////////////////////////
// CReaderHistory dialog
CReaderHistory::CReaderHistory(CWnd* pParent /*=NULL*/)
: CDialog(CReaderHistory::IDD, pParent)
{
//{{AFX_DATA_INIT(CReaderHistory)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CReaderHistory::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CReaderHistory)
DDX_Control(pDX, IDC_ADODC1, m_Adodc);
DDX_Control(pDX, IDC_DATAGRID1, m_DataGrid);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CReaderHistory, CDialog)
//{{AFX_MSG_MAP(CReaderHistory)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CReaderHistory message handlers
BOOL CReaderHistory::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CString vSQL;
vSQL = "select Book.BNo As 书号, Book.BName As 书名, Author As 作者, BrTime As 借出时间, RtTime As 还书时间 ";
vSQL += "From Book,Borrow ";
vSQL += "where Book.BNo=Borrow.BNo and Borrow.RNo='";
vSQL = vSQL + ReaderUser.GetNo() + "'";
m_Adodc.SetRecordSource(vSQL);
m_Adodc.Refresh();
long i = m_DataGrid.GetApproxCount();
vSQL.Format("%d",i);
GetDlgItem(IDC_NUM)->SetWindowText(vSQL);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -