📄 depemp.cpp
字号:
// depemp.cpp : implementation file
//
#include "stdafx.h"
#include "数据库.h"
#include "depemp.h"
#include "Chadep.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Cdepemp dialog
Cdepemp::Cdepemp(CWnd* pParent /*=NULL*/)
: CDialog(Cdepemp::IDD, pParent)
{
//{{AFX_DATA_INIT(Cdepemp)
//}}AFX_DATA_INIT
}
void Cdepemp::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Cdepemp)
DDX_Control(pDX, IDC_DATAGRID1, m_datagridd);
DDX_Control(pDX, IDC_ADODC1, m_adodcc);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Cdepemp, CDialog)
//{{AFX_MSG_MAP(Cdepemp)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Cdepemp message handlers
BOOL Cdepemp::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CChadep dlg;
CString cSource;
cSource.Format( "SELECT 姓名, 地址,部门号 from 员工表 where 部门号=%d",dlg.depid);
//设置数据源
m_adodcc.SetRecordSource(cSource);
m_adodcc.Refresh();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void Cdepemp::OnOK()
{
// TODO: Add extra validation here
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -