添加主要窗口并屏蔽OnOk和OnCancel函数
This commit is contained in:
parent
511b97fda2
commit
e4aa7cbd32
50
aike/BookingDlg.cpp
Normal file
50
aike/BookingDlg.cpp
Normal file
@ -0,0 +1,50 @@
|
||||
// BookingDlg.cpp: 实现文件
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "aike.h"
|
||||
#include "afxdialogex.h"
|
||||
#include "BookingDlg.h"
|
||||
|
||||
|
||||
// BookingDlg 对话框
|
||||
|
||||
IMPLEMENT_DYNAMIC(BookingDlg, CDialogEx)
|
||||
|
||||
BookingDlg::BookingDlg(CWnd* pParent /*=nullptr*/)
|
||||
: CDialogEx(IDD_BOOKINGDLG, pParent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BookingDlg::~BookingDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void BookingDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialogEx::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(BookingDlg, CDialogEx)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// BookingDlg 消息处理程序
|
||||
|
||||
|
||||
void BookingDlg::OnCancel()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnCancel();
|
||||
}
|
||||
|
||||
|
||||
void BookingDlg::OnOK()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnOK();
|
||||
}
|
26
aike/BookingDlg.h
Normal file
26
aike/BookingDlg.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include "afxdialogex.h"
|
||||
|
||||
|
||||
// BookingDlg 对话框
|
||||
|
||||
class BookingDlg : public CDialogEx
|
||||
{
|
||||
DECLARE_DYNAMIC(BookingDlg)
|
||||
|
||||
public:
|
||||
BookingDlg(CWnd* pParent = nullptr); // 标准构造函数
|
||||
virtual ~BookingDlg();
|
||||
|
||||
// 对话框数据
|
||||
#ifdef AFX_DESIGN_TIME
|
||||
enum { IDD = IDD_BOOKINGDLG };
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
};
|
50
aike/BusinessDlg.cpp
Normal file
50
aike/BusinessDlg.cpp
Normal file
@ -0,0 +1,50 @@
|
||||
// BusinessDlg.cpp: 实现文件
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "aike.h"
|
||||
#include "afxdialogex.h"
|
||||
#include "BusinessDlg.h"
|
||||
|
||||
|
||||
// BusinessDlg 对话框
|
||||
|
||||
IMPLEMENT_DYNAMIC(BusinessDlg, CDialogEx)
|
||||
|
||||
BusinessDlg::BusinessDlg(CWnd* pParent /*=nullptr*/)
|
||||
: CDialogEx(IDD_BUSINESSDLG, pParent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BusinessDlg::~BusinessDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void BusinessDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialogEx::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(BusinessDlg, CDialogEx)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// BusinessDlg 消息处理程序
|
||||
|
||||
|
||||
void BusinessDlg::OnCancel()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnCancel();
|
||||
}
|
||||
|
||||
|
||||
void BusinessDlg::OnOK()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnOK();
|
||||
}
|
26
aike/BusinessDlg.h
Normal file
26
aike/BusinessDlg.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include "afxdialogex.h"
|
||||
|
||||
|
||||
// BusinessDlg 对话框
|
||||
|
||||
class BusinessDlg : public CDialogEx
|
||||
{
|
||||
DECLARE_DYNAMIC(BusinessDlg)
|
||||
|
||||
public:
|
||||
BusinessDlg(CWnd* pParent = nullptr); // 标准构造函数
|
||||
virtual ~BusinessDlg();
|
||||
|
||||
// 对话框数据
|
||||
#ifdef AFX_DESIGN_TIME
|
||||
enum { IDD = IDD_BUSINESSDLG };
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
};
|
50
aike/InventoryDlg.cpp
Normal file
50
aike/InventoryDlg.cpp
Normal file
@ -0,0 +1,50 @@
|
||||
// InventoryDlg.cpp: 实现文件
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "aike.h"
|
||||
#include "afxdialogex.h"
|
||||
#include "InventoryDlg.h"
|
||||
|
||||
|
||||
// InventoryDlg 对话框
|
||||
|
||||
IMPLEMENT_DYNAMIC(InventoryDlg, CDialogEx)
|
||||
|
||||
InventoryDlg::InventoryDlg(CWnd* pParent /*=nullptr*/)
|
||||
: CDialogEx(IDD_INVENTORYDLG, pParent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
InventoryDlg::~InventoryDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void InventoryDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialogEx::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(InventoryDlg, CDialogEx)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// InventoryDlg 消息处理程序
|
||||
|
||||
|
||||
void InventoryDlg::OnCancel()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnCancel();
|
||||
}
|
||||
|
||||
|
||||
void InventoryDlg::OnOK()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnOK();
|
||||
}
|
26
aike/InventoryDlg.h
Normal file
26
aike/InventoryDlg.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include "afxdialogex.h"
|
||||
|
||||
|
||||
// InventoryDlg 对话框
|
||||
|
||||
class InventoryDlg : public CDialogEx
|
||||
{
|
||||
DECLARE_DYNAMIC(InventoryDlg)
|
||||
|
||||
public:
|
||||
InventoryDlg(CWnd* pParent = nullptr); // 标准构造函数
|
||||
virtual ~InventoryDlg();
|
||||
|
||||
// 对话框数据
|
||||
#ifdef AFX_DESIGN_TIME
|
||||
enum { IDD = IDD_INVENTORYDLG };
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
};
|
50
aike/MemberDlg.cpp
Normal file
50
aike/MemberDlg.cpp
Normal file
@ -0,0 +1,50 @@
|
||||
// MemberDlg.cpp: 实现文件
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "aike.h"
|
||||
#include "afxdialogex.h"
|
||||
#include "MemberDlg.h"
|
||||
|
||||
|
||||
// MemberDlg 对话框
|
||||
|
||||
IMPLEMENT_DYNAMIC(MemberDlg, CDialogEx)
|
||||
|
||||
MemberDlg::MemberDlg(CWnd* pParent /*=nullptr*/)
|
||||
: CDialogEx(IDD_MEMBERDLG, pParent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
MemberDlg::~MemberDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void MemberDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialogEx::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(MemberDlg, CDialogEx)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// MemberDlg 消息处理程序
|
||||
|
||||
|
||||
void MemberDlg::OnCancel()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnCancel();
|
||||
}
|
||||
|
||||
|
||||
void MemberDlg::OnOK()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnOK();
|
||||
}
|
26
aike/MemberDlg.h
Normal file
26
aike/MemberDlg.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include "afxdialogex.h"
|
||||
|
||||
|
||||
// MemberDlg 对话框
|
||||
|
||||
class MemberDlg : public CDialogEx
|
||||
{
|
||||
DECLARE_DYNAMIC(MemberDlg)
|
||||
|
||||
public:
|
||||
MemberDlg(CWnd* pParent = nullptr); // 标准构造函数
|
||||
virtual ~MemberDlg();
|
||||
|
||||
// 对话框数据
|
||||
#ifdef AFX_DESIGN_TIME
|
||||
enum { IDD = IDD_MEMBERDLG };
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
};
|
50
aike/ReportDlg.cpp
Normal file
50
aike/ReportDlg.cpp
Normal file
@ -0,0 +1,50 @@
|
||||
// ReportDlg.cpp: 实现文件
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "aike.h"
|
||||
#include "afxdialogex.h"
|
||||
#include "ReportDlg.h"
|
||||
|
||||
|
||||
// ReportDlg 对话框
|
||||
|
||||
IMPLEMENT_DYNAMIC(ReportDlg, CDialogEx)
|
||||
|
||||
ReportDlg::ReportDlg(CWnd* pParent /*=nullptr*/)
|
||||
: CDialogEx(IDD_REPORTDLG, pParent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ReportDlg::~ReportDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void ReportDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialogEx::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(ReportDlg, CDialogEx)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// ReportDlg 消息处理程序
|
||||
|
||||
|
||||
void ReportDlg::OnCancel()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnCancel();
|
||||
}
|
||||
|
||||
|
||||
void ReportDlg::OnOK()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnOK();
|
||||
}
|
26
aike/ReportDlg.h
Normal file
26
aike/ReportDlg.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include "afxdialogex.h"
|
||||
|
||||
|
||||
// ReportDlg 对话框
|
||||
|
||||
class ReportDlg : public CDialogEx
|
||||
{
|
||||
DECLARE_DYNAMIC(ReportDlg)
|
||||
|
||||
public:
|
||||
ReportDlg(CWnd* pParent = nullptr); // 标准构造函数
|
||||
virtual ~ReportDlg();
|
||||
|
||||
// 对话框数据
|
||||
#ifdef AFX_DESIGN_TIME
|
||||
enum { IDD = IDD_REPORTDLG };
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
};
|
50
aike/RoomSetUpDlg.cpp
Normal file
50
aike/RoomSetUpDlg.cpp
Normal file
@ -0,0 +1,50 @@
|
||||
// RoomSetUpDlg.cpp: 实现文件
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "aike.h"
|
||||
#include "afxdialogex.h"
|
||||
#include "RoomSetUpDlg.h"
|
||||
|
||||
|
||||
// RoomSetUpDlg 对话框
|
||||
|
||||
IMPLEMENT_DYNAMIC(RoomSetUpDlg, CDialogEx)
|
||||
|
||||
RoomSetUpDlg::RoomSetUpDlg(CWnd* pParent /*=nullptr*/)
|
||||
: CDialogEx(IDD_ROOMSETUPDLG, pParent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
RoomSetUpDlg::~RoomSetUpDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void RoomSetUpDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialogEx::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(RoomSetUpDlg, CDialogEx)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// RoomSetUpDlg 消息处理程序
|
||||
|
||||
|
||||
void RoomSetUpDlg::OnCancel()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnCancel();
|
||||
}
|
||||
|
||||
|
||||
void RoomSetUpDlg::OnOK()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnOK();
|
||||
}
|
26
aike/RoomSetUpDlg.h
Normal file
26
aike/RoomSetUpDlg.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include "afxdialogex.h"
|
||||
|
||||
|
||||
// RoomSetUpDlg 对话框
|
||||
|
||||
class RoomSetUpDlg : public CDialogEx
|
||||
{
|
||||
DECLARE_DYNAMIC(RoomSetUpDlg)
|
||||
|
||||
public:
|
||||
RoomSetUpDlg(CWnd* pParent = nullptr); // 标准构造函数
|
||||
virtual ~RoomSetUpDlg();
|
||||
|
||||
// 对话框数据
|
||||
#ifdef AFX_DESIGN_TIME
|
||||
enum { IDD = IDD_ROOMSETUPDLG };
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
};
|
50
aike/SetUpDlg.cpp
Normal file
50
aike/SetUpDlg.cpp
Normal file
@ -0,0 +1,50 @@
|
||||
// SetUpDlg.cpp: 实现文件
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "aike.h"
|
||||
#include "afxdialogex.h"
|
||||
#include "SetUpDlg.h"
|
||||
|
||||
|
||||
// SetUpDlg 对话框
|
||||
|
||||
IMPLEMENT_DYNAMIC(SetUpDlg, CDialogEx)
|
||||
|
||||
SetUpDlg::SetUpDlg(CWnd* pParent /*=nullptr*/)
|
||||
: CDialogEx(IDD_SETUPDLG, pParent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
SetUpDlg::~SetUpDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void SetUpDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialogEx::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(SetUpDlg, CDialogEx)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// SetUpDlg 消息处理程序
|
||||
|
||||
|
||||
void SetUpDlg::OnCancel()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnCancel();
|
||||
}
|
||||
|
||||
|
||||
void SetUpDlg::OnOK()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnOK();
|
||||
}
|
26
aike/SetUpDlg.h
Normal file
26
aike/SetUpDlg.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include "afxdialogex.h"
|
||||
|
||||
|
||||
// SetUpDlg 对话框
|
||||
|
||||
class SetUpDlg : public CDialogEx
|
||||
{
|
||||
DECLARE_DYNAMIC(SetUpDlg)
|
||||
|
||||
public:
|
||||
SetUpDlg(CWnd* pParent = nullptr); // 标准构造函数
|
||||
virtual ~SetUpDlg();
|
||||
|
||||
// 对话框数据
|
||||
#ifdef AFX_DESIGN_TIME
|
||||
enum { IDD = IDD_SETUPDLG };
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
};
|
@ -5,6 +5,7 @@
|
||||
#include "aike.h"
|
||||
#include "afxdialogex.h"
|
||||
#include "StaffDlg.h"
|
||||
#include "aikeDlg.h"
|
||||
|
||||
|
||||
// StaffDlg 对话框
|
||||
@ -29,17 +30,12 @@ void StaffDlg::DoDataExchange(CDataExchange* pDX)
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(StaffDlg, CDialogEx)
|
||||
ON_BN_CLICKED(IDOK, &StaffDlg::OnBnClickedOk)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// StaffDlg 消息处理程序
|
||||
|
||||
|
||||
void StaffDlg::OnBnClickedOk()
|
||||
{
|
||||
// TODO: 在此添加控件通知处理程序代码
|
||||
}
|
||||
|
||||
|
||||
BOOL StaffDlg::OnInitDialog()
|
||||
@ -62,3 +58,97 @@ BOOL StaffDlg::OnInitDialog()
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// 异常: OCX 属性页应返回 FALSE
|
||||
}
|
||||
|
||||
//显示员工信息
|
||||
VOID StaffDlg::ShowStaff()
|
||||
{
|
||||
CaikeDlg* dlg = (CaikeDlg*)GetParent();
|
||||
m_Staff.DeleteAllItems();
|
||||
CRect rt = { 0,0,100,30 };
|
||||
rt.MoveToXY(150, 50);
|
||||
_RecordsetPtr m_pRecor;
|
||||
_variant_t var;
|
||||
CString str = (_T("select JobID,a.name,sex,b.name 'department', c.name 'category',workforce,phone,BeginDate from staff a,department b,category c")), tmp;
|
||||
dlg->AdoSql.QuerySql(str, m_pRecor);
|
||||
int i = 0;
|
||||
while (!m_pRecor->GetadoEOF())
|
||||
{
|
||||
var = m_pRecor->GetCollect("JobID");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
if (tmp == _T(""))
|
||||
{
|
||||
m_pRecor->MoveNext();
|
||||
continue;
|
||||
}
|
||||
m_Staff.InsertItem(i, tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pRecor->MoveNext();
|
||||
continue;
|
||||
}
|
||||
var = m_pRecor->GetCollect("name");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 1, tmp);
|
||||
}
|
||||
var = m_pRecor->GetCollect("sex");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 2, tmp);
|
||||
}
|
||||
var = m_pRecor->GetCollect("department");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 3, tmp);
|
||||
}
|
||||
var = m_pRecor->GetCollect("category");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 4, tmp);
|
||||
}
|
||||
var = m_pRecor->GetCollect("workforce");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 5, tmp);
|
||||
}
|
||||
var = m_pRecor->GetCollect("phone");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 6, tmp);
|
||||
}
|
||||
var = m_pRecor->GetCollect("BeginDate");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 7, tmp);
|
||||
}
|
||||
|
||||
m_pRecor->MoveNext();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void StaffDlg::OnOK()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnOK();
|
||||
}
|
||||
|
||||
|
||||
void StaffDlg::OnCancel()
|
||||
{
|
||||
// TODO: 在此添加专用代码和/或调用基类
|
||||
|
||||
//CDialogEx::OnCancel();
|
||||
}
|
||||
|
@ -22,7 +22,9 @@ protected:
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg void OnBnClickedOk();
|
||||
virtual BOOL OnInitDialog();
|
||||
CListCtrl m_Staff;
|
||||
virtual BOOL OnInitDialog();
|
||||
VOID ShowStaff(); //显示员工信息
|
||||
virtual void OnOK();
|
||||
virtual void OnCancel();
|
||||
};
|
||||
|
BIN
aike/aike.rc
BIN
aike/aike.rc
Binary file not shown.
@ -187,7 +187,14 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="aike.h" />
|
||||
<ClInclude Include="aikeDlg.h" />
|
||||
<ClInclude Include="BookingDlg.h" />
|
||||
<ClInclude Include="BusinessDlg.h" />
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="InventoryDlg.h" />
|
||||
<ClInclude Include="MemberDlg.h" />
|
||||
<ClInclude Include="ReportDlg.h" />
|
||||
<ClInclude Include="RoomSetUpDlg.h" />
|
||||
<ClInclude Include="SetUpDlg.h" />
|
||||
<ClInclude Include="StaffDlg.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
@ -196,6 +203,13 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="aike.cpp" />
|
||||
<ClCompile Include="aikeDlg.cpp" />
|
||||
<ClCompile Include="BookingDlg.cpp" />
|
||||
<ClCompile Include="BusinessDlg.cpp" />
|
||||
<ClCompile Include="InventoryDlg.cpp" />
|
||||
<ClCompile Include="MemberDlg.cpp" />
|
||||
<ClCompile Include="ReportDlg.cpp" />
|
||||
<ClCompile Include="RoomSetUpDlg.cpp" />
|
||||
<ClCompile Include="SetUpDlg.cpp" />
|
||||
<ClCompile Include="StaffDlg.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
|
@ -36,6 +36,27 @@
|
||||
<ClInclude Include="StaffDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="BookingDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="BusinessDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InventoryDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MemberDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ReportDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RoomSetUpDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SetUpDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="aike.cpp">
|
||||
@ -50,6 +71,27 @@
|
||||
<ClCompile Include="StaffDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="BookingDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="BusinessDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InventoryDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MemberDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ReportDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="RoomSetUpDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SetUpDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="aike.rc">
|
||||
|
@ -380,7 +380,7 @@ VOID CaikeDlg::SetUpClick(int id)
|
||||
VOID CaikeDlg::StaffClick(int id)
|
||||
{
|
||||
m_StaffDlg.ShowWindow(SW_SHOW);
|
||||
ShowStaff(m_StaffDlg.m_Staff);
|
||||
m_StaffDlg.ShowStaff();
|
||||
}
|
||||
|
||||
//回到主页
|
||||
@ -392,82 +392,4 @@ VOID CaikeDlg::HomepageClick(int id)
|
||||
HideAllBt(FALSE);
|
||||
}
|
||||
|
||||
//显示员工信息
|
||||
VOID CaikeDlg::ShowStaff(CListCtrl& m_Staff)
|
||||
{
|
||||
m_Staff.DeleteAllItems();
|
||||
CRect rt = { 0,0,100,30 };
|
||||
rt.MoveToXY(150, 50);
|
||||
_RecordsetPtr m_pRecor;
|
||||
_variant_t var;
|
||||
CString str = (_T("select JobID,a.name,sex,b.name 'department', c.name 'category',workforce,phone,BeginDate from staff a,department b,category c")), tmp;
|
||||
AdoSql.QuerySql(str, m_pRecor);
|
||||
int i = 0;
|
||||
while (!m_pRecor->GetadoEOF())
|
||||
{
|
||||
var = m_pRecor->GetCollect("JobID");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
if (tmp == _T(""))
|
||||
{
|
||||
m_pRecor->MoveNext();
|
||||
continue;
|
||||
}
|
||||
m_Staff.InsertItem(i, tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pRecor->MoveNext();
|
||||
continue;
|
||||
}
|
||||
var = m_pRecor->GetCollect("name");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 1, tmp);
|
||||
}
|
||||
var = m_pRecor->GetCollect("sex");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 2, tmp);
|
||||
}
|
||||
var = m_pRecor->GetCollect("department");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 3, tmp);
|
||||
}
|
||||
var = m_pRecor->GetCollect("category");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 4, tmp);
|
||||
}
|
||||
var = m_pRecor->GetCollect("workforce");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 5, tmp);
|
||||
}
|
||||
var = m_pRecor->GetCollect("phone");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 6, tmp);
|
||||
}
|
||||
var = m_pRecor->GetCollect("BeginDate");
|
||||
if (var.vt != VT_NULL)
|
||||
{
|
||||
tmp = (LPCTSTR)_bstr_t(var);
|
||||
m_Staff.SetItemText(i, 7, tmp);
|
||||
}
|
||||
|
||||
m_pRecor->MoveNext();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -64,7 +64,6 @@ public:
|
||||
VOID SetUpClick(int id); //设置按钮
|
||||
VOID HomepageClick(int id); //回到主页
|
||||
VOID StaffClick(int id);
|
||||
VOID ShowStaff(CListCtrl& m_Staff); //显示员工信息
|
||||
};
|
||||
|
||||
|
||||
|
@ -6,6 +6,14 @@
|
||||
#define IDD_AIKE_DIALOG 102
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_STAFFDLG 132
|
||||
#define IDD_DEPARTMENTDLG 134
|
||||
#define IDD_ROOMSETUPDLG 134
|
||||
#define IDD_BUSINESSDLG 135
|
||||
#define IDD_MEMBERDLG 136
|
||||
#define IDD_SETUPDLG 137
|
||||
#define IDD_BOOKINGDLG 138
|
||||
#define IDD_INVENTORYDLG 139
|
||||
#define IDD_REPORTDLG 140
|
||||
#define IDC_LIST1 1000
|
||||
#define ID_32771 32771
|
||||
#define ID_32772 32772
|
||||
@ -16,7 +24,7 @@
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 134
|
||||
#define _APS_NEXT_RESOURCE_VALUE 136
|
||||
#define _APS_NEXT_COMMAND_VALUE 32775
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
|
Loading…
Reference in New Issue
Block a user