?? manager.cpp
字號:
// Manager.cpp : implementation file
//
#include "stdafx.h"
#include "SQL.h"
#include "Manager.h"
#include "Dtatabaseset.h"
#include "ProjectManage.h"
#include "Depart.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CManager dialog
CManager::CManager(CWnd* pParent /*=NULL*/)
: CDialog(CManager::IDD, pParent)
{
//{{AFX_DATA_INIT(CManager)
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 CManager::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CManager)
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(CManager, CDialog)
//{{AFX_MSG_MAP(CManager)
ON_BN_CLICKED(IDC_INTERPROJECT, OnInterproject)
ON_BN_CLICKED(IDC_INTERSECTOR, OnIntersector)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CManager message handlers
BOOL CManager::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))
{
AfxMessageBox("數據庫打開失敗!");
}
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 CManager::OnInterproject()
{
CProjectManage m_ProjectManage;
m_ProjectManage.DoModal();
}
void CManager::OnIntersector()
{
// TODO: Add your control notification handler code here
CDepart m_departCtrl;
m_departCtrl.DoModal();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -