📄 seek.cpp
字号:
// seek.cpp : implementation file
//
#include "stdafx.h"
#include "课程设计.h"
#include "seek.h"
#include "film.h"
#include "rage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Cseek dialog
Cseek::Cseek(CWnd* pParent /*=NULL*/)
: CDialog(Cseek::IDD, pParent)
{
//{{AFX_DATA_INIT(Cseek)
m_id = _T("");
//}}AFX_DATA_INIT
}
void Cseek::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Cseek)
DDX_Control(pDX, IDC_LIST1, m_list);
DDX_Text(pDX, IDC_EDIT1, m_id);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Cseek, CDialog)
//{{AFX_MSG_MAP(Cseek)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Cseek message handlers
void Cseek::OnOK()
{
// TODO: Add extra validation here
Cfilm film;
UpdateData(true);
CString str,msg="未借出";
str=m_id;
if(str=="")
AfxMessageBox("请输入要查询的影碟的编号");
else
{
film.sql_seek(str);
if(film.lend==true)
msg="借出";
if(film.id!=0)
{
str.Format("%d",film.id);
m_list.AddString(str + " " + film.name + " " + film.author + " " + msg);
}
}
//CDialog::OnOK();
}
void Cseek::OnButton1()
{
// TODO: Add your control notification handler code here
m_id="";
UpdateData(false);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -