📄 delete.cpp
字号:
// delete.cpp : implementation file
//
#include "stdafx.h"
#include "课程设计.h"
#include "delete.h"
#include "film.h"
#include "rage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Cdelete dialog
Cdelete::Cdelete(CWnd* pParent /*=NULL*/)
: CDialog(Cdelete::IDD, pParent)
{
//{{AFX_DATA_INIT(Cdelete)
m_id = _T("");
//}}AFX_DATA_INIT
}
void Cdelete::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Cdelete)
DDX_Text(pDX, IDC_EDIT1, m_id);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Cdelete, CDialog)
//{{AFX_MSG_MAP(Cdelete)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Cdelete message handlers
void Cdelete::OnOK()
{
// TODO: Add extra validation here
UpdateData(true);
CString str;
str=m_id;
if(str=="")
AfxMessageBox("编号不能为空");
else
{
if(IDOK==AfxMessageBox("确定要删除编号为"+str+"的纪录吗") )
{
Cfilm film;
Crage rage;
film.sql_delete(str);
rage.sql_delete(str);
}
}
//CDialog::OnOK();
}
void Cdelete::OnCancel()
{
// TODO: Add extra cleanup here
CDialog::OnCancel();
}
void Cdelete::OnButton1()
{
// TODO: Add your control notification handler code here
m_id="";
UpdateData(false);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -