📄 readerborrow.cpp
字号:
// ReaderBorrow.cpp : implementation file
//
#include "stdafx.h"
#include "Library.h"
#include "ReaderBorrow.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CReader ReaderUser;
///////////////////////////////////////////////////////////////////////////
// CReaderBorrow dialog
CReaderBorrow::CReaderBorrow(CWnd* pParent /*=NULL*/)
: CDialog(CReaderBorrow::IDD, pParent)
{
//{{AFX_DATA_INIT(CReaderBorrow)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CReaderBorrow::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CReaderBorrow)
DDX_Control(pDX, IDC_ADODC1, m_Adodc);
DDX_Control(pDX, IDC_DATAGRID1, m_DataGrid);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CReaderBorrow, CDialog)
//{{AFX_MSG_MAP(CReaderBorrow)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CReaderBorrow message handlers
BOOL CReaderBorrow::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
//m_DataGrid.SetRefDataSource(NULL);
CString vSQL;
vSQL = "select Book.BNo As 书号, Book.BName As 书名, Author As 作者, BrTime As 借出时间,MsTime AS 该还时间 ";
vSQL += "From Book,Borrow ";
vSQL += "where Book.BNo=Borrow.BNo and Borrow.RNo='";
vSQL = vSQL + ReaderUser.GetNo() + "' AND RtTime=''";
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 + -