资源简介
应用MFC编译的酒店客房管理系统,实现了查询删除等各项功能。

代码片段和文件信息
// chaxun.cpp : implementation file
//
#include “stdafx.h“
#include “酒店客房管理系统.h“
#include “chaxun.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
typedef struct Cxin//创建一个Cxin结构体用于保存订单中的所有信息
{
CString number;
CString price;
CString kind;
CString name;
CString time;
CString TL;
};
Cxin *p1;
typedef struct Cpiao//创建一个Cpiao结构体用于储存房间的所有属性
{
CString number;
CString price;
CString kind;
};
Cpiao *p2;
/////////////////////////////////////////////////////////////////////////////
// Ctest dialog
/////////////////////////////////////////////////////////////////////////////
// Cchaxun dialog
Cchaxun::Cchaxun(CWnd* pParent /*=NULL*/)
: CDialog(Cchaxun::IDD pParent)
{
Cpiao *p2=new Cpiao;
bool flg=1;
CStdioFile file(“data.txt“CFile::modeRead);//读取data.txt中的数据
flg=file.ReadString(p2->number);
while(flg)
{
flg=file.ReadString(p2->price);
flg=file.ReadString(p2->kind);
m_ren.AddTail(p2);
p2=new Cpiao;
flg=file.ReadString(p2->number);
}
file.Close();
//{{AFX_DATA_INIT(Cchaxun)
m_edit1 = _T(““);
m_edit2 = _T(““);
m_edit3 = _T(““);
m_edit4 = _T(““);
m_edit5 = _T(““);
m_edit7 = _T(““);
m_edit8 = _T(““);
//}}AFX_DATA_INIT
}
void Cchaxun::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Cchaxun)
DDX_Text(pDX IDC_EDIT1 m_edit1);
DDX_Text(pDX IDC_EDIT2 m_edit2);
DDX_Text(pDX IDC_EDIT3 m_edit3);
DDX_Text(pDX IDC_EDIT4 m_edit4);
DDX_Text(pDX IDC_EDIT5 m_edit5);
DDX_Text(pDX IDC_EDIT7 m_edit7);
DDX_Text(pDX IDC_EDIT8 m_edit8);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Cchaxun CDialog)
//{{AFX_MSG_MAP(Cchaxun)
ON_BN_CLICKED(IDC_BUTTON1 OnButton1)
ON_BN_CLICKED(IDC_BUTTON2 OnButton2)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Cchaxun message handlers
void Cchaxun::OnButton1()
{
// TODO: Add your control notification handler code here
UpdateData();
POSITION pos;
bool flg=0;
pos=m_ren.GetHeadPosition();
while(pos!=NULL)//信息的检索,将输入信息和data.txt中的数据进行对比,将符合信息输出
{
p2=(Cpiao*)m_ren.GetNext(pos);
if(m_edit1==p2->number)
{
m_edit2=p2->number;
m_edit3=p2->price;
m_edit4=p2->kind;
UpdateData(0);
flg=1;
break;
}
}
//m_line.GetPrev(pos);
if(!flg)
{
m_edit2=““;
m_edit3=““;
m_edit4=““;
UpdateData(0);
MessageBox(“没有此房间“);
}
}
void Cchaxun::OnButton2()
{
// TODO: Add your control notification handler code here
UpdateData();
p1=new Cxin;
p1->name=m_edit5;
p1->number=m_edit2;
p1->price=m_edit3;
p1->kind=m_edit4;
p1->time=m_edit7;
p1->TL=m_edit8;
m_renren.AddTail(p1);//将窗口编辑中的内容赋值给Cxin写入链表尾部
MessageBox(“以保存当前订房“);
}
void Cchaxun::OnOK() //对“确定“按钮进行定义
{
// TODO: Add extra validation here
CStdioFile file(“data2.txt“CFile::mode
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3558 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\chaxun.cpp
文件 1357 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\chaxun.h
文件 2513 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\check.cpp
文件 1275 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\check.h
文件 50 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\data.txt
文件 47 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\data2.txt
文件 29634 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\chaxun.obj
文件 22215 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\check.obj
文件 16616 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\face.obj
文件 14958 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\jiemian.obj
文件 22509 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\MainFrm.obj
文件 106077 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\StdAfx.obj
文件 336896 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\vc60.idb
文件 372736 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\vc60.pdb
文件 135315 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\酒店客房管理系统.exe
文件 338588 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\酒店客房管理系统.ilk
文件 23290 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\酒店客房管理系统.obj
文件 5615700 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\酒店客房管理系统.pch
文件 451584 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\酒店客房管理系统.pdb
文件 9268 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\酒店客房管理系统.res
文件 15096 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\酒店客房管理系统Doc.obj
文件 19957 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\Debug\酒店客房管理系统View.obj
文件 1310 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\face.cpp
文件 1196 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\face.h
文件 1083 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\jiemian.cpp
文件 1193 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\jiemian.h
文件 2559 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\MainFrm.cpp
文件 1474 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\MainFrm.h
文件 4453 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\ReadMe.txt
文件 1078 2012-06-29 17:01 电子081 0808140626 任立兢 17 酒店客房管理系统 - 副本\酒店客房管理系统\res\Toolbar.bmp
............此处省略27个文件信息
- 上一篇:雷霆战机 c++源码
- 下一篇:银行账户管理系统C++
相关资源
- 基于MFC的TCP调试助手源码95706
- 基于mfc的多线程文件传输
- VC++ 多线程文件读写操作
- 移木块游戏,可以自编自玩,vc6.0编写
- MFC数字钟(基于VC6.0)
- VC++MFC小游戏实例教程(实例)+MFC类库
- VC++实现CMD命令执行与获得返回信息
- ChartCtrl控件库(可在VS2019中使用)
- 商品库存管理系统 C++ MFC
- mfc 调用redis
- MFC视频播放器源码(支持avi/wma/mp3等格
- VC++基于OpenGL模拟的一个3维空间模型
- mfc绘图大全(画直线、矩形、椭圆)
- MFC控件重绘
- hook,捕获所有案件,查找所有窗口,
- (学习)VS2010之MFC入门到精通教程
- 基于VC++的SolidWorks二次开发SolidWorks
- MFC文档_视图_框架_模板结构体系深入
- 简单员工管理系统(适合初学MFC)
- 派克变换VC++源码(附文档)
- VC++ 串口
- MFC五子棋游戏
- VC++ 大富翁4_大富翁游戏源码
- MFC UDP编程
- MFC的异步网络通讯应用程序
- VC++ 摄像头视频采集与回放源程序
- C++MFC模块讲解,黑发程序员课程整理
- 转 VC++ 实现电子邮件(Email)发送
- 一个简单而强大的基于MFC的web server源
- 基于MFC的VC++仿QQ浏览器源码(雏形)
评论
共有 条评论