⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 empolyee.cpp

📁 一个简单的公司员工管理系统
💻 CPP
字号:
// Empolyee.cpp : implementation file
//

#include "stdafx.h"
#include "SQL.h"
#include "Empolyee.h"
#include "Dtatabaseset.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CEmpolyee dialog


CEmpolyee::CEmpolyee(CWnd* pParent /*=NULL*/)
	: CDialog(CEmpolyee::IDD, pParent)
{
	//{{AFX_DATA_INIT(CEmpolyee)
	m_age = _T("");
	m_constract = _T("");
	m_duty = _T("");
	m_name = _T("");
	m_eno = _T("");
	m_other = _T("");
	m_sector = _T("");
	m_sex = _T("");
	//}}AFX_DATA_INIT
}


void CEmpolyee::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CEmpolyee)
	DDX_Text(pDX, IDC_EAGE, m_age);
	DDX_Text(pDX, IDC_ECONSTRACT, m_constract);
	DDX_Text(pDX, IDC_EDUTY, m_duty);
	DDX_Text(pDX, IDC_ENAME, m_name);
	DDX_Text(pDX, IDC_ENO, m_eno);
	DDX_Text(pDX, IDC_EOTHER, m_other);
	DDX_Text(pDX, IDC_ESECTOR, m_sector);
	DDX_Text(pDX, IDC_ESEX, m_sex);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CEmpolyee, CDialog)
	//{{AFX_MSG_MAP(CEmpolyee)
	ON_EN_CHANGE(IDC_ENO, OnChangeEno)
	ON_EN_CHANGE(IDC_ECONSTRACT, OnChangeEconstract)
  //ON_BN_CLICKED(NOTECTRL, OnNOTECTRL)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEmpolyee message handlers

void CEmpolyee::OnChangeEno() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	
	
}

void CEmpolyee::OnChangeEconstract() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	
}
BOOL CEmpolyee::OnInitDialog()
{
CDatabaseset m_Set(&m_db);
CString str;
str.Format("select * from Employee where Eno = '%s' and Ecode = '%s' ",Id,Code);
if(!m_Set.Open(CRecordset::dynaset,str))
{

}
m_Set.MoveFirst();
CString EmployeNo;
m_Set.GetFieldValue((short)0,EmployeNo);
m_eno = EmployeNo;
CString ename,esex,eage,econtract,esector,eduty,ecode,eother;
m_Set.GetFieldValue((short)1,ename);
m_name = ename;
m_Set.GetFieldValue((short)2,esex);
m_sex = esex;
m_Set.GetFieldValue((short)3,eage);
m_age = eage;
m_Set.GetFieldValue((short)4,econtract);
m_constract = econtract;
m_Set.GetFieldValue((short)5,esector);
m_sector = esector;
m_Set.GetFieldValue((short)6,eduty);
m_duty = eduty;
m_Set.GetFieldValue((short)8,eother);
m_other = eother;




UpdateData(false);
return true;

}

void CEmpolyee::OnNOTECTRL() 
{
	// TODO: Add your control notification handler code here
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -