添加基础设置里面的按钮和界面

This commit is contained in:
~ Alone 2024-05-08 23:08:01 +08:00
parent 5bef44a9af
commit 683f0aa2c0
20 changed files with 699 additions and 24 deletions

34
aike/CommodityDlg.cpp Normal file
View File

@ -0,0 +1,34 @@
// CommodityDlg.cpp: 实现文件
//
#include "pch.h"
#include "aike.h"
#include "afxdialogex.h"
#include "CommodityDlg.h"
// CommodityDlg 对话框
IMPLEMENT_DYNAMIC(CommodityDlg, CDialogEx)
CommodityDlg::CommodityDlg(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_COMMODITYDLG, pParent)
{
}
CommodityDlg::~CommodityDlg()
{
}
void CommodityDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CommodityDlg, CDialogEx)
END_MESSAGE_MAP()
// CommodityDlg 消息处理程序

24
aike/CommodityDlg.h Normal file
View File

@ -0,0 +1,24 @@
#pragma once
#include "afxdialogex.h"
// CommodityDlg 对话框
class CommodityDlg : public CDialogEx
{
DECLARE_DYNAMIC(CommodityDlg)
public:
CommodityDlg(CWnd* pParent = nullptr); // 标准构造函数
virtual ~CommodityDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_COMMODITYDLG };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
};

34
aike/CouponDlg.cpp Normal file
View File

@ -0,0 +1,34 @@
// CouponDlg.cpp: 实现文件
//
#include "pch.h"
#include "aike.h"
#include "afxdialogex.h"
#include "CouponDlg.h"
// CouponDlg 对话框
IMPLEMENT_DYNAMIC(CouponDlg, CDialogEx)
CouponDlg::CouponDlg(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_COUPONDLG, pParent)
{
}
CouponDlg::~CouponDlg()
{
}
void CouponDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CouponDlg, CDialogEx)
END_MESSAGE_MAP()
// CouponDlg 消息处理程序

24
aike/CouponDlg.h Normal file
View File

@ -0,0 +1,24 @@
#pragma once
#include "afxdialogex.h"
// CouponDlg 对话框
class CouponDlg : public CDialogEx
{
DECLARE_DYNAMIC(CouponDlg)
public:
CouponDlg(CWnd* pParent = nullptr); // 标准构造函数
virtual ~CouponDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_COUPONDLG };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
};

34
aike/DiscountDlg.cpp Normal file
View File

@ -0,0 +1,34 @@
// DiscountDlg.cpp: 实现文件
//
#include "pch.h"
#include "aike.h"
#include "afxdialogex.h"
#include "DiscountDlg.h"
// DiscountDlg 对话框
IMPLEMENT_DYNAMIC(DiscountDlg, CDialogEx)
DiscountDlg::DiscountDlg(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_COUPONDLG, pParent)
{
}
DiscountDlg::~DiscountDlg()
{
}
void DiscountDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(DiscountDlg, CDialogEx)
END_MESSAGE_MAP()
// DiscountDlg 消息处理程序

26
aike/DiscountDlg.h Normal file
View File

@ -0,0 +1,26 @@
#pragma once
#include "afxdialogex.h"
// DiscountDlg 对话框
class DiscountDlg : public CDialogEx
{
DECLARE_DYNAMIC(DiscountDlg)
public:
DiscountDlg(CWnd* pParent = nullptr); // 标准构造函数
virtual ~DiscountDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_DISCOUNTDLG};
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
};

34
aike/MemberSetUpDlg.cpp Normal file
View File

@ -0,0 +1,34 @@
// MemberSetUpDlg.cpp: 实现文件
//
#include "pch.h"
#include "aike.h"
#include "afxdialogex.h"
#include "MemberSetUpDlg.h"
// MemberSetUpDlg 对话框
IMPLEMENT_DYNAMIC(MemberSetUpDlg, CDialogEx)
MemberSetUpDlg::MemberSetUpDlg(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_PRINTDLG, pParent)
{
}
MemberSetUpDlg::~MemberSetUpDlg()
{
}
void MemberSetUpDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(MemberSetUpDlg, CDialogEx)
END_MESSAGE_MAP()
// MemberSetUpDlg 消息处理程序

23
aike/MemberSetUpDlg.h Normal file
View File

@ -0,0 +1,23 @@
#pragma once
#include "afxdialogex.h"
// MemberSetUpDlg 对话框
class MemberSetUpDlg : public CDialogEx
{
DECLARE_DYNAMIC(MemberSetUpDlg)
public:
MemberSetUpDlg(CWnd* pParent = nullptr); // 标准构造函数
virtual ~MemberSetUpDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_MEMBERSETUPDLG};
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
};

34
aike/ParameterDlg.cpp Normal file
View File

@ -0,0 +1,34 @@
// ParameterDlg.cpp: 实现文件
//
#include "pch.h"
#include "aike.h"
#include "afxdialogex.h"
#include "ParameterDlg.h"
// ParameterDlg 对话框
IMPLEMENT_DYNAMIC(ParameterDlg, CDialogEx)
ParameterDlg::ParameterDlg(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_PAYMENTDLG, pParent)
{
}
ParameterDlg::~ParameterDlg()
{
}
void ParameterDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(ParameterDlg, CDialogEx)
END_MESSAGE_MAP()
// ParameterDlg 消息处理程序

23
aike/ParameterDlg.h Normal file
View File

@ -0,0 +1,23 @@
#pragma once
#include "afxdialogex.h"
// ParameterDlg 对话框
class ParameterDlg : public CDialogEx
{
DECLARE_DYNAMIC(ParameterDlg)
public:
ParameterDlg(CWnd* pParent = nullptr); // 标准构造函数
virtual ~ParameterDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_PARAMENTERDLG };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
};

34
aike/PaymentDlg.cpp Normal file
View File

@ -0,0 +1,34 @@
// PaymentDlg.cpp: 实现文件
//
#include "pch.h"
#include "aike.h"
#include "afxdialogex.h"
#include "PaymentDlg.h"
// PaymentDlg 对话框
IMPLEMENT_DYNAMIC(PaymentDlg, CDialogEx)
PaymentDlg::PaymentDlg(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_PAYMENTDLG, pParent)
{
}
PaymentDlg::~PaymentDlg()
{
}
void PaymentDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(PaymentDlg, CDialogEx)
END_MESSAGE_MAP()
// PaymentDlg 消息处理程序

24
aike/PaymentDlg.h Normal file
View File

@ -0,0 +1,24 @@
#pragma once
#include "afxdialogex.h"
// PaymentDlg 对话框
class PaymentDlg : public CDialogEx
{
DECLARE_DYNAMIC(PaymentDlg)
public:
PaymentDlg(CWnd* pParent = nullptr); // 标准构造函数
virtual ~PaymentDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_PAYMENTDLG };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
};

34
aike/PrintSetUpDlg.cpp Normal file
View File

@ -0,0 +1,34 @@
// PrintSetUpDlg.cpp: 实现文件
//
#include "pch.h"
#include "aike.h"
#include "afxdialogex.h"
#include "PrintSetUpDlg.h"
// PrintSetUpDlg 对话框
IMPLEMENT_DYNAMIC(PrintSetUpDlg, CDialogEx)
PrintSetUpDlg::PrintSetUpDlg(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_PRINTDLG, pParent)
{
}
PrintSetUpDlg::~PrintSetUpDlg()
{
}
void PrintSetUpDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(PrintSetUpDlg, CDialogEx)
END_MESSAGE_MAP()
// PrintSetUpDlg 消息处理程序

24
aike/PrintSetUpDlg.h Normal file
View File

@ -0,0 +1,24 @@
#pragma once
#include "afxdialogex.h"
// PrintSetUpDlg 对话框
class PrintSetUpDlg : public CDialogEx
{
DECLARE_DYNAMIC(PrintSetUpDlg)
public:
PrintSetUpDlg(CWnd* pParent = nullptr); // 标准构造函数
virtual ~PrintSetUpDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_PRINTDLG };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
};

Binary file not shown.

View File

@ -187,8 +187,14 @@
<ItemGroup> <ItemGroup>
<ClInclude Include="aike.h" /> <ClInclude Include="aike.h" />
<ClInclude Include="aikeDlg.h" /> <ClInclude Include="aikeDlg.h" />
<ClInclude Include="CommodityDlg.h" />
<ClInclude Include="CouponDlg.h" />
<ClInclude Include="DiscountDlg.h" />
<ClInclude Include="framework.h" /> <ClInclude Include="framework.h" />
<ClInclude Include="InventoryDlg.h" /> <ClInclude Include="MemberSetUpDlg.h" />
<ClInclude Include="ParameterDlg.h" />
<ClInclude Include="PaymentDlg.h" />
<ClInclude Include="PrintSetUpDlg.h" />
<ClInclude Include="RoomSetUpDlg.h" /> <ClInclude Include="RoomSetUpDlg.h" />
<ClInclude Include="StaffDlg.h" /> <ClInclude Include="StaffDlg.h" />
<ClInclude Include="pch.h" /> <ClInclude Include="pch.h" />
@ -198,6 +204,13 @@
<ItemGroup> <ItemGroup>
<ClCompile Include="aike.cpp" /> <ClCompile Include="aike.cpp" />
<ClCompile Include="aikeDlg.cpp" /> <ClCompile Include="aikeDlg.cpp" />
<ClCompile Include="CommodityDlg.cpp" />
<ClCompile Include="CouponDlg.cpp" />
<ClCompile Include="DiscountDlg.cpp" />
<ClCompile Include="MemberSetUpDlg.cpp" />
<ClCompile Include="ParameterDlg.cpp" />
<ClCompile Include="PaymentDlg.cpp" />
<ClCompile Include="PrintSetUpDlg.cpp" />
<ClCompile Include="RoomSetUpDlg.cpp" /> <ClCompile Include="RoomSetUpDlg.cpp" />
<ClCompile Include="StaffDlg.cpp" /> <ClCompile Include="StaffDlg.cpp" />
<ClCompile Include="pch.cpp"> <ClCompile Include="pch.cpp">

View File

@ -36,10 +36,28 @@
<ClInclude Include="StaffDlg.h"> <ClInclude Include="StaffDlg.h">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="InventoryDlg.h"> <ClInclude Include="RoomSetUpDlg.h">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="RoomSetUpDlg.h"> <ClInclude Include="CommodityDlg.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="PaymentDlg.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="PrintSetUpDlg.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="MemberSetUpDlg.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="DiscountDlg.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CouponDlg.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="ParameterDlg.h">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</ClInclude> </ClInclude>
</ItemGroup> </ItemGroup>
@ -59,6 +77,27 @@
<ClCompile Include="RoomSetUpDlg.cpp"> <ClCompile Include="RoomSetUpDlg.cpp">
<Filter>源文件</Filter> <Filter>源文件</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="CommodityDlg.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="PaymentDlg.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="PrintSetUpDlg.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="MemberSetUpDlg.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="DiscountDlg.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CouponDlg.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="ParameterDlg.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="aike.rc"> <ResourceCompile Include="aike.rc">

View File

@ -211,12 +211,19 @@ VOID CaikeDlg::Initialize()
EnableButton(3, FALSE); EnableButton(3, FALSE);
MaxClick(0); MaxClick(0);
m_StaffDlg.Create(IDD_STAFFDLG, this);
m_RoomSetUpDlg.Create(IDD_ROOMSETUPDLG, this); m_RoomSetUpDlg.Create(IDD_ROOMSETUPDLG, this);
m_CommodityDlg.Create(IDD_COMMODITYDLG, this);
PaymentDlg.Create(IDD_PAYMENTDLG, this);
MemberSetUpDlg.Create(IDD_MEMBERSETUPDLG, this);
m_DiscountDlg.Create(IDD_DISCOUNTDLG, this);
m_StaffDlg.Create(IDD_STAFFDLG, this);
PrintSetUpDlg.Create(IDD_PRINTDLG, this);
m_CouponDlg.Create(IDD_COUPONDLG, this);
m_ParameterDlg.Create(IDD_PARAMENTERDLG, this);
//FixedSize(); //FixedSize();
//连接服务器 //连接服务器
//SClien.Create(); //SClien.Create();
//SClien.SetConnectFun([this](int i) {TCPState(i); }); //SClien.SetConnectFun([this](int i) {TCPState(i); });
@ -344,8 +351,17 @@ VOID CaikeDlg::MoveAllWin()
rt.MoveToXY(-50, -50); rt.MoveToXY(-50, -50);
rt.left = 150; rt.left = 150;
rt.top = (50); rt.top = (50);
m_StaffDlg.MoveWindow(rt);
m_RoomSetUpDlg.MoveWindow(rt); m_RoomSetUpDlg.MoveWindow(rt);
m_CommodityDlg.MoveWindow(rt);
PaymentDlg.MoveWindow(rt);
MemberSetUpDlg.MoveWindow(rt);
m_DiscountDlg.MoveWindow(rt);
m_StaffDlg.MoveWindow(rt);
PrintSetUpDlg.MoveWindow(rt);
m_CouponDlg.MoveWindow(rt);
m_ParameterDlg.MoveWindow(rt);
} }
@ -372,40 +388,204 @@ VOID CaikeDlg::SetUpClick(int id)
rt.MoveToXY(30, 90); rt.MoveToXY(30, 90);
AddButton(6001, rt); AddButton(6001, rt);
SetLClick(6001, [this](int i) {StaffClick(i); }); SetLClick(6001, [this](int i) {RoomSetUpClick(i); });
rt.MoveToXY(30, 130); rt.MoveToXY(30, 130);
AddButton(6002, rt); AddButton(6002, rt);
SetLClick(6002, [this](int i) {RoomSetUpClick(i); }); SetLClick(6002, [this](int i) {CommodityClick(i); });
rt.MoveToXY(30, 170);
AddButton(6003, rt);
SetLClick(6003, [this](int i) {PaymentClick(i); });
rt.MoveToXY(30, 210);
AddButton(6004, rt);
SetLClick(6004, [this](int i) {MemberSetUpClick(i); });
rt.MoveToXY(30, 250);
AddButton(6005, rt);
SetLClick(6005, [this](int i) {DiscountClick(i); });
rt.MoveToXY(30, 290);
AddButton(6006, rt);
SetLClick(6006, [this](int i) {StaffClick(i); });
rt.MoveToXY(30, 330);
AddButton(6007, rt);
SetLClick(6007, [this](int i) {PrintSetUpClick(i); });
rt.MoveToXY(30, 370);
AddButton(6008, rt);
SetLClick(6008, [this](int i) {CouponClick(i); });
rt.MoveToXY(30, 410);
AddButton(6009, rt);
SetLClick(6009, [this](int i) {ParameterClick(i); });
} }
ShowButton(1001, TRUE); ShowButton(1001, TRUE);
ShowButton(6001, TRUE); ShowButton(6001, TRUE);
ShowButton(6002, TRUE); ShowButton(6002, TRUE);
ShowButton(6003, TRUE);
ShowButton(6004, TRUE);
ShowButton(6005, TRUE);
ShowButton(6006, TRUE);
ShowButton(6007, TRUE);
ShowButton(6008, TRUE);
ShowButton(6009, TRUE);
} }
//回到主页 //回到主页
VOID CaikeDlg::HomepageClick(int id) VOID CaikeDlg::HomepageClick(int id)
{ {
m_StaffDlg.ShowWindow(SW_HIDE);
m_RoomSetUpDlg.ShowWindow(SW_HIDE); m_RoomSetUpDlg.ShowWindow(SW_HIDE);
m_CommodityDlg.ShowWindow(SW_HIDE);
PaymentDlg.ShowWindow(SW_HIDE);
MemberSetUpDlg.ShowWindow(SW_HIDE);
m_DiscountDlg.ShowWindow(SW_HIDE);
m_StaffDlg.ShowWindow(SW_HIDE);
PrintSetUpDlg.ShowWindow(SW_HIDE);
m_CouponDlg.ShowWindow(SW_HIDE);
m_ParameterDlg.ShowWindow(SW_HIDE);
ShowButton(1001, FALSE); ShowButton(1001, FALSE);
ShowButton(6001, FALSE); ShowButton(6001, FALSE);
ShowButton(6002, FALSE); ShowButton(6002, FALSE);
ShowButton(6003, FALSE);
ShowButton(6004, FALSE);
ShowButton(6005, FALSE);
ShowButton(6006, FALSE);
ShowButton(6007, FALSE);
ShowButton(6008, FALSE);
ShowButton(6009, FALSE);
HideAllBt(FALSE); HideAllBt(FALSE);
} }
//点击房间设置
VOID CaikeDlg::RoomSetUpClick(int id)
{
m_CommodityDlg.ShowWindow(SW_HIDE);
PaymentDlg.ShowWindow(SW_HIDE);
MemberSetUpDlg.ShowWindow(SW_HIDE);
m_DiscountDlg.ShowWindow(SW_HIDE);
m_StaffDlg.ShowWindow(SW_HIDE);
PrintSetUpDlg.ShowWindow(SW_HIDE);
m_CouponDlg.ShowWindow(SW_HIDE);
m_ParameterDlg.ShowWindow(SW_HIDE);
m_RoomSetUpDlg.ShowWindow(SW_SHOW);
}
//点击商品设置
VOID CaikeDlg::CommodityClick(int id)
{
m_RoomSetUpDlg.ShowWindow(SW_HIDE);
PaymentDlg.ShowWindow(SW_HIDE);
MemberSetUpDlg.ShowWindow(SW_HIDE);
m_DiscountDlg.ShowWindow(SW_HIDE);
m_StaffDlg.ShowWindow(SW_HIDE);
PrintSetUpDlg.ShowWindow(SW_HIDE);
m_CouponDlg.ShowWindow(SW_HIDE);
m_ParameterDlg.ShowWindow(SW_HIDE);
m_CommodityDlg.ShowWindow(SW_SHOW);
}
//点击付款方式
VOID CaikeDlg::PaymentClick(int id)
{
m_RoomSetUpDlg.ShowWindow(SW_HIDE);
m_CommodityDlg.ShowWindow(SW_HIDE);
MemberSetUpDlg.ShowWindow(SW_HIDE);
m_DiscountDlg.ShowWindow(SW_HIDE);
m_StaffDlg.ShowWindow(SW_HIDE);
PrintSetUpDlg.ShowWindow(SW_HIDE);
m_CouponDlg.ShowWindow(SW_HIDE);
m_ParameterDlg.ShowWindow(SW_HIDE);
PaymentDlg.ShowWindow(SW_SHOW);
}
//点击会员管理
VOID CaikeDlg::MemberSetUpClick(int id)
{
m_RoomSetUpDlg.ShowWindow(SW_HIDE);
m_CommodityDlg.ShowWindow(SW_HIDE);
PaymentDlg.ShowWindow(SW_HIDE);
m_DiscountDlg.ShowWindow(SW_HIDE);
m_StaffDlg.ShowWindow(SW_HIDE);
PrintSetUpDlg.ShowWindow(SW_HIDE);
m_CouponDlg.ShowWindow(SW_HIDE);
m_ParameterDlg.ShowWindow(SW_HIDE);
MemberSetUpDlg.ShowWindow(SW_SHOW);
}
//点击折扣方案
VOID CaikeDlg::DiscountClick(int id)
{
m_RoomSetUpDlg.ShowWindow(SW_HIDE);
m_CommodityDlg.ShowWindow(SW_HIDE);
PaymentDlg.ShowWindow(SW_HIDE);
MemberSetUpDlg.ShowWindow(SW_HIDE);
m_StaffDlg.ShowWindow(SW_HIDE);
PrintSetUpDlg.ShowWindow(SW_HIDE);
m_CouponDlg.ShowWindow(SW_HIDE);
m_ParameterDlg.ShowWindow(SW_HIDE);
m_DiscountDlg.ShowWindow(SW_SHOW);
}
//点击员工信息 //点击员工信息
VOID CaikeDlg::StaffClick(int id) VOID CaikeDlg::StaffClick(int id)
{ {
m_RoomSetUpDlg.ShowWindow(SW_HIDE); m_RoomSetUpDlg.ShowWindow(SW_HIDE);
m_CommodityDlg.ShowWindow(SW_HIDE);
PaymentDlg.ShowWindow(SW_HIDE);
MemberSetUpDlg.ShowWindow(SW_HIDE);
m_DiscountDlg.ShowWindow(SW_HIDE);
PrintSetUpDlg.ShowWindow(SW_HIDE);
m_CouponDlg.ShowWindow(SW_HIDE);
m_ParameterDlg.ShowWindow(SW_HIDE);
m_StaffDlg.ShowWindow(SW_SHOW); m_StaffDlg.ShowWindow(SW_SHOW);
m_StaffDlg.ShowStaff(); m_StaffDlg.ShowStaff();
} }
VOID CaikeDlg::RoomSetUpClick(int id) //点击打印设置
VOID CaikeDlg::PrintSetUpClick(int id)
{ {
m_RoomSetUpDlg.ShowWindow(SW_HIDE);
m_CommodityDlg.ShowWindow(SW_HIDE);
PaymentDlg.ShowWindow(SW_HIDE);
MemberSetUpDlg.ShowWindow(SW_HIDE);
m_DiscountDlg.ShowWindow(SW_HIDE);
m_StaffDlg.ShowWindow(SW_HIDE); m_StaffDlg.ShowWindow(SW_HIDE);
m_RoomSetUpDlg.ShowWindow(SW_SHOW); m_CouponDlg.ShowWindow(SW_HIDE);
m_ParameterDlg.ShowWindow(SW_HIDE);
PrintSetUpDlg.ShowWindow(SW_SHOW);
} }
//点击票券设置
VOID CaikeDlg::CouponClick(int id)
{
m_RoomSetUpDlg.ShowWindow(SW_HIDE);
m_CommodityDlg.ShowWindow(SW_HIDE);
PaymentDlg.ShowWindow(SW_HIDE);
MemberSetUpDlg.ShowWindow(SW_HIDE);
m_DiscountDlg.ShowWindow(SW_HIDE);
m_StaffDlg.ShowWindow(SW_HIDE);
PrintSetUpDlg.ShowWindow(SW_HIDE);
m_ParameterDlg.ShowWindow(SW_HIDE);
m_CouponDlg.ShowWindow(SW_SHOW);
}
//点击参数设置
VOID CaikeDlg::ParameterClick(int id)
{
m_RoomSetUpDlg.ShowWindow(SW_HIDE);
m_CommodityDlg.ShowWindow(SW_HIDE);
PaymentDlg.ShowWindow(SW_HIDE);
MemberSetUpDlg.ShowWindow(SW_HIDE);
m_DiscountDlg.ShowWindow(SW_HIDE);
m_StaffDlg.ShowWindow(SW_HIDE);
PrintSetUpDlg.ShowWindow(SW_HIDE);
m_CouponDlg.ShowWindow(SW_HIDE);
m_ParameterDlg.ShowWindow(SW_SHOW);
}

View File

@ -5,24 +5,31 @@
#pragma once #pragma once
#include "StaffDlg.h" #include "StaffDlg.h"
#include "RoomSetUpDlg.h" #include "RoomSetUpDlg.h"
#include "CommodityDlg.h"
#include "DiscountDlg.h"
#include "MemberSetUpDlg.h"
#include "PaymentDlg.h"
#include "PrintSetUpDlg.h"
#include "CouponDlg.h"
#include "ParameterDlg.h"
// CaikeDlg 对话框 // CaikeDlg 对话框
class CaikeDlg : public CDialogEx,MyDialog class CaikeDlg : public CDialogEx, MyDialog
{ {
// 构造 // 构造
public: public:
CaikeDlg(CWnd* pParent = nullptr); // 标准构造函数 CaikeDlg(CWnd* pParent = nullptr); // 标准构造函数
// 对话框数据 // 对话框数据
#ifdef AFX_DESIGN_TIME #ifdef AFX_DESIGN_TIME
enum { IDD = IDD_AIKE_DIALOG }; enum { IDD = IDD_AIKE_DIALOG };
#endif #endif
protected: protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
// 实现 // 实现
protected: protected:
HICON m_hIcon; HICON m_hIcon;
@ -34,14 +41,21 @@ protected:
public: public:
//变量 //变量
ADOSQL AdoSql; //连接数据库 ADOSQL AdoSql; //连接数据库
//SocketClien SClien; //连接服务器 //SocketClien SClien; //连接服务器
CString m_Path; //本程序路径 CString m_Path; //本程序路径
CString ServerIP; //服务器IP CString ServerIP; //服务器IP
CString DataBase; //数据库名称 CString DataBase; //数据库名称
CString UserName; //数据库用户名 CString UserName; //数据库用户名
CString AdoPass; //数据库密码 CString AdoPass; //数据库密码
StaffDlg m_StaffDlg; //员工信息界面 RoomSetUpDlg m_RoomSetUpDlg; //房间设置界面
RoomSetUpDlg m_RoomSetUpDlg; //员工信息界面 CommodityDlg m_CommodityDlg; //商品信息界面
PaymentDlg PaymentDlg; //付款方式界面
MemberSetUpDlg MemberSetUpDlg; //会员设置界面
DiscountDlg m_DiscountDlg; //折扣方案界面
StaffDlg m_StaffDlg; //员工信息界面
PrintSetUpDlg PrintSetUpDlg; //打印设置界面
CouponDlg m_CouponDlg; //票券设置界面
ParameterDlg m_ParameterDlg; //参数设置界面
//MFC回调函数 //MFC回调函数
virtual BOOL PreTranslateMessage(MSG* pMsg); //截获窗口消息 virtual BOOL PreTranslateMessage(MSG* pMsg); //截获窗口消息
@ -64,8 +78,15 @@ public:
VOID HideAllBt(BOOL Hide = TRUE); //隐藏所有按钮 VOID HideAllBt(BOOL Hide = TRUE); //隐藏所有按钮
VOID SetUpClick(int id); //设置按钮 VOID SetUpClick(int id); //设置按钮
VOID HomepageClick(int id); //回到主页 VOID HomepageClick(int id); //回到主页
VOID RoomSetUpClick(int id); //点击房间设置
VOID CommodityClick(int id); //点击商品设置
VOID PaymentClick(int id); //点击付款方式
VOID MemberSetUpClick(int id); //点击会员管理
VOID DiscountClick(int id); //点击折扣方案
VOID StaffClick(int id); //点击员工信息 VOID StaffClick(int id); //点击员工信息
VOID RoomSetUpClick(int id); //点击员工信息 VOID PrintSetUpClick(int id); //点击打印设置
VOID CouponClick(int id); //点击票券设置
VOID ParameterClick(int id); //点击参数设置
}; };
@ -82,6 +103,13 @@ public:
5000 5000
6000 6000
1001 1001
6001 6001
6002 6002
6003
6004
6005
6006
6007
6008
6009
*/ */

View File

@ -7,7 +7,16 @@
#define IDR_MAINFRAME 128 #define IDR_MAINFRAME 128
#define IDD_STAFFDLG 132 #define IDD_STAFFDLG 132
#define IDD_ROOMSETUPDLG 134 #define IDD_ROOMSETUPDLG 134
#define IDD_COMMODITYDLG 135
#define IDD_PAYMENTDLG 136
#define IDD_PRINTDLG 137
#define IDD_MEMBERSETUPDLG 138
#define IDD_COUPONDLG 139
#define IDD_DISCOUNTDLG 140
#define IDD_PARAMENTERDLG 141
#define IDC_LIST1 1000 #define IDC_LIST1 1000
#define IDC_BUTTON1 1001
#define IDC_BUTTON2 1002
#define ID_32771 32771 #define ID_32771 32771
#define ID_32772 32772 #define ID_32772 32772
#define ID_SHOW_MENU 32773 #define ID_SHOW_MENU 32773
@ -19,7 +28,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 136 #define _APS_NEXT_RESOURCE_VALUE 136
#define _APS_NEXT_COMMAND_VALUE 32775 #define _APS_NEXT_COMMAND_VALUE 32775
#define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_CONTROL_VALUE 1002
#define _APS_NEXT_SYMED_VALUE 101 #define _APS_NEXT_SYMED_VALUE 101
#endif #endif
#endif #endif