?? 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 + -