时讯:【源码展示】门诊预约系统项目界面功能实现11.CMain
目录
效果展示
四:门诊预约系统项目界面功能实现
(资料图片)
11.CMainWin.h .cpp【系统主界面】
12.CAdminmainWin.h .cpp【管理员主界面】
13.CAdminuserqueryWin.h .cpp【管理员查询用户界面】
14.CAdmindoctorWin.h .cpp【管理员管理医生界面】
15.CAdmindoctorqueryWin.h .cpp【管理员查询医生界面】
16.CAdmindoctoraddWin.h .cpp【管理员新增医生界面】
17.CAdmindoctormodifyWin.h .cpp【管理员修改医生信息界面】
18.CAdmindepartmentWin.h .cpp【管理员查询科室界面】
19.CDoctormainWin.h .cpp【医生主界面】
20.CDoctormedicalinfoWin.h .cpp【医生的就诊信息界面】
21.CDoctormedicalrecWin.h .cpp【医生的就诊信息的就诊记录界面】
效果展示
本次项目工程量较大,源码分四篇呈现,另外三篇如下
C++项目-门诊预约系统1
C++项目-门诊预约系统3
C++项目-门诊预约系统4
四:门诊预约系统项目界面功能实现
11.CMainWin.h .cpp【系统主界面】
#ifndef CMAINWIN_H#define CMAINWIN_H#include"CWinBase.h"//继承窗口基类#include"CButton.h"//按钮类#include "CLabel.h"//标签类#include"CEdit.h"//编辑框类 //系统主窗口 继承 窗口基类class CMainWin:public CWinBase{public:CMainWin();//默认构造~CMainWin();//析构CMainWin(int x,int y,int w,int h);//带参构造//纯虚函数 子类各不相同 需要子类各自实现方法int doAction();//按键响应执行protected:private: CLabel *titlezhu,*titlehao;//标签CButton *btnzhuce ,*btndenglu,*btntuichu;//按钮}; #endif
#include"CMainWin.h"//系统主窗口#include"CTools.h"//工具类#includeusing namespace std; //系统主窗口 继承 窗口基类[默认构造]CMainWin::CMainWin():CWinBase(){}//析构CMainWin::~CMainWin(){} //系统主窗口 继承 窗口基类[带参构造]CMainWin::CMainWin(int x,int y,int w,int h):CWinBase(x,y,w,h){//控件创建//标签 this->titlezhu = new CLabel(17,7,10,2,"欢迎来到门诊预约管理系统",LABEL);//0this->titlehao = new CLabel(33,19,10,2,"CSDN博主:顾城沐心",LABEL);//1//按钮this->btnzhuce = new CButton(19,9,8,3,"注册",BUTTON);//2this->btndenglu = new CButton(19,12,8,3,"登录",BUTTON); //3this->btntuichu = new CButton(19,15,8,3,"退出",BUTTON);//4 //添加控件到窗口中this->addControl(this->titlezhu); this->addControl(this->titlehao);this->addControl(this->btnzhuce);this->addControl(this->btndenglu);this->addControl(this->btntuichu); } //按键响应执行int CMainWin::doAction(){switch(this->focusIndex){case 2: return 1;//到注册界面case 3: return 2;//到登录界面default:break;}return 0;}
12.CAdminmainWin.h .cpp【管理员主界面】
#ifndef CADMINMAINWIN_H#define CADMINMAINWIN_H#include"CWinBase.h"//继承窗口基类#include"CButton.h"//按钮类#include "CLabel.h"//标签类#include"CEdit.h"//编辑框类 //管理员主界面 继承 窗口基类class CAdminmainWin:public CWinBase{public:CAdminmainWin();//默认构造~CAdminmainWin();//析构CAdminmainWin(int x,int y,int w,int h);//带参构造int doAction();//按键执行响应protected:private: CLabel *titleguan,*titlehy,*titlerq;//标签CButton *btnyh ,*btnys,*btnks,*btnsj,*btntc;//按钮 }; #endif
#include"CAdminmainWin.h"//管理员主界面#include"CTools.h"//工具类#includeusing namespace std; //管理员主界面 继承 窗口基类[默认构造]CAdminmainWin::CAdminmainWin():CWinBase(){}//析构CAdminmainWin::~CAdminmainWin(){} //管理员主界面 继承 窗口基类[带参构造]CAdminmainWin::CAdminmainWin(int x,int y,int w,int h):CWinBase(x,y,w,h){//控件创建//标签 this->titleguan = new CLabel(21,7,10,2,"管理员主界面",LABEL);//0this->titlehy = new CLabel(8,10,10,2,"欢迎,1000管理员",LABEL);//1 this->titlerq = new CLabel(29,10,10,2,"日期",LABEL);//2//按钮this->btnyh = new CButton(10,11,8,3,"用户管理",BUTTON);//3this->btnys = new CButton(28,11,8,3,"医生管理",BUTTON); //4this->btnks = new CButton(10,14,8,3,"科室管理",BUTTON); //5this->btnsj = new CButton(28,14,8,3,"数据统计",BUTTON); //6this->btntc = new CButton(10,17,8,3,"退出",BUTTON); //7 //控件添加到窗口中this->addControl(this->titleguan); this->addControl(this->titlehy);this->addControl(this->titlerq);this->addControl(this->btnyh);this->addControl(this->btnys);this->addControl(this->btnks); this->addControl(this->btnsj); this->addControl(this->btntc); } //管理员主界面 按键响应执行int CAdminmainWin::doAction(){switch(this->focusIndex){case 7: return 2; //按角色登录界面 case 4: return 15; //管理员管理医生界面 case 3: return 17; //管理员查询用户界面case 5: return 18; //管理员查询科室界面default:break;}return 3;//管理员主界面}
13.CAdminuserqueryWin.h .cpp【管理员查询用户界面】
#ifndef CADMINUSERQUERYWIN_H#define CADMINUSERQUERYWIN_H#include"CWinBase.h"//继承窗口基类#include"CButton.h"//按钮类#include "CLabel.h"//标签类#include"CEdit.h"//编辑框类#include"CTable.h"//表格类 //管理员查询用户窗口 继承 窗口基类class CAdminuserqueryWin:public CWinBase{public:CAdminuserqueryWin();//默认构造~CAdminuserqueryWin();//析构CAdminuserqueryWin(int x,int y,int w,int h);//带参构造 int doAction();//按键执行响应 void showWindow();//显示窗口 虚函数 虚virtual标识符在窗口基类写[其他地方不写] int WinRun();//窗口运行 虚函数 虚virtual标识符在窗口基类写[其他地方不写]protected:private: CLabel *titlehyld,*titlehy,*titlerq,*titlesryhid,*titlefy;//标签 CButton *btnchaxun ,*btnfanhui;//按钮CEdit *editsryhid;//编辑框Table *table;//表格}; #endif
#pragma warning(disable
:4786)#include"CAdminuserqueryWin.h"//管理员查询用户#include"CTools.h"//工具类#include"CData.h"//公共数据类#include"CTable.h"//表格类#include#include#include#includeusing
namespace std;#include//管理员查询用户窗 继承
窗口基类[默认构造]CAdminuserqueryWin::CAdminuserqueryWin():CWinBase(){}//析构CAdminuserqueryWin::~CAdminuserqueryWin(){}
//管理员查询用户窗 继承 窗口基类[带参构造]CAdminuserqueryWin::CAdminuserqueryWin(int x,int y,int
w,int h):CWinBase(x,y,w,h){//创建控件//标签 this->titlehyld = new
CLabel(25,7,34,4,"欢迎来到门诊预约管理系统",LABEL);//0this->titlehy = new
CLabel(8,10,10,2,"欢迎,1000管理员",LABEL);//1 this->titlerq = new
CLabel(39,10,10,2,"日期",LABEL);//2this->titlesryhid = new
CLabel(9,13,10,2,"请输入用户账号:",LABEL);//3 this->titlefy = new
CLabel(42,33,10,2,"按<- -="">翻页",LABEL);//4//编辑框this->editsryhid = new
CEdit(26,12,10,3,"",11,2,1,EDIT);//5//按钮this->btnchaxun = new
CButton(44,12,10,3,"查询",BUTTON); //6this->btnfanhui = new
CButton(9,32,10,3,"返回",BUTTON); //7//表格表头设置vectorheader;
header.push_back("账号");header.push_back("身份信息");//添加控件this->addControl(this->titlehyld);
this->addControl(this->titlehy);this->addControl(this->titlerq);this->addControl(this->titlesryhid);this->addControl(this->titlefy);this->addControl(this->editsryhid);this->addControl(this->btnchaxun);this->addControl(this->btnfanhui);//创建
表格this->table=new Table(7,18,31,10,4,2,header);} //按键执行响应[可以操作表格;在表格中显示数据]int
CAdminuserqueryWin::doAction(){ map::iterator
it;switch(this->focusIndex){case 7: //返回return 3; //管理员主界面case 6:
//查询for(it=CData::userMap.begin();it!=CData::userMap.end();it++){if(strstr(it->second.getphoneNum().c_str(),this->editsryhid->getContent())!=NULL)//查询{
this->table->clearTable();//清空表格 this->table->show();//显示表格
CTools::gotoxy(9,22); cout<second.getphoneNum().c_str()<<ENDL;
ctools::gotoxy(40,22);=""
cout
14.CAdmindoctorWin.h .cpp【管理员管理医生界面】
#ifndef CADMINDOCTORWIN_H#define CADMINDOCTORWIN_H#include"CWinBase.h"//继承窗口基类#include"CButton.h"//按钮类#include "CLabel.h"//标签类#include"CEdit.h"//编辑框类 //管理员管理医生窗 继承 窗口基类class CAdmindoctorWin:public CWinBase{public:CAdmindoctorWin();//默认构造~CAdmindoctorWin();//析构CAdmindoctorWin(int x,int y,int w,int h);//带参构造int doAction();//按键执行响应protected:private:CLabel *titleysgl,*titlehy;//标签CButton *btnyscx ,*btnxzys,*btnysxxxg,*btnfanhui;//按钮};#endif
#include"CAdmindoctorWin.h"//管理员管理医生#include"CTools.h"//工具类#include"CData.h"//公共数据类#includeusing namespace std; //管理员管理医生窗 继承 窗口基类[默认构造]CAdmindoctorWin::CAdmindoctorWin():CWinBase(){}//析构CAdmindoctorWin::~CAdmindoctorWin(){} //管理员管理医生窗 继承 窗口基类[带参构造]CAdmindoctorWin::CAdmindoctorWin(int x,int y,int w,int h):CWinBase(x,y,w,h){//创建控件//按钮this->btnyscx = new CButton(8,15,10,3,"医生查询",BUTTON); //0this->btnxzys = new CButton(28,15,10,3,"新增医生",BUTTON); //1this->btnysxxxg = new CButton(8,18,10,3,"医生信息修改",BUTTON);//2this->btnfanhui = new CButton(18,23,10,3,"返回",BUTTON); //3 //标签this->titleysgl = new CLabel(21,7,34,4,"医生管理界面",LABEL);//4this->titlehy = new CLabel(8,10,10,2,"欢迎,1000管理员",LABEL);//5//添加控件到窗口this->addControl(this->btnyscx); this->addControl(this->btnxzys);this->addControl(this->btnysxxxg); this->addControl(this->btnfanhui);this->addControl(this->titleysgl);this->addControl(this->titlehy); } //按键响应执行int CAdmindoctorWin::doAction(){switch(this->focusIndex){case 3: return 3; //管理员主界面case 1: return 14; //新增医生主界面case 0: return 16; //医生查询主界面case 2: return 22; //医生信息修改主界面default:break;}return 15;//管理员管医生界面}
15.CAdmindoctorqueryWin.h .cpp【管理员查询医生界面】
#ifndef CADMINDOCTORQUERYWIN_H#define CADMINDOCTORQUERYWIN_H#include"CWinBase.h"//继承窗口基类#include"CButton.h"//按钮#include "CLabel.h"//标签#include"CEdit.h"//编辑框#include"CTable.h"//表格 //管理员查询医生窗 继承 窗口基类class CAdmindoctorqueryWin:public CWinBase{public:CAdmindoctorqueryWin();//默认构造~CAdmindoctorqueryWin();//析构CAdmindoctorqueryWin(int x,int y,int w,int h);//带参构造 int doAction();//按键执行响应[纯虚函数] void showWindow();//窗口显示[虚函数] int WinRun();//窗口运行[虚函数]protected:private: CLabel *titlehyld,*titlehy,*titlerq,*titlesrysid,*titlefy,*titlexzsj;//标签 CButton *btnchaxun ,*btnfanhui;//按钮CEdit *editsrysid;//编辑框Table *table;//表格}; #endif
#pragma warning(disable
:4786)#include"CAdmindoctorqueryWin.h"//管理员查询医生#include"CTools.h"//工具类#include"CData.h"//公共数据类#include"CTable.h"//表格类#include#include#include#include#includeusing
namespace std; //管理员查询医生
继承窗口基类[默认构造]CAdmindoctorqueryWin::CAdmindoctorqueryWin():CWinBase(){}//析构CAdmindoctorqueryWin::~CAdmindoctorqueryWin(){}
//管理员查询医生 继承窗口基类[带参构造]CAdmindoctorqueryWin::CAdmindoctorqueryWin(int x,int y,int
w,int h):CWinBase(x,y,w,h){//控件创建//标签 this->titlehyld = new
CLabel(25,7,34,4,"欢迎来到门诊预约管理系统",LABEL);//0this->titlehy = new
CLabel(8,10,10,2,"欢迎,1000管理员",LABEL);//1 this->titlerq = new
CLabel(39,10,10,2,"日期",LABEL);//2this->titlesrysid = new
CLabel(9,13,10,2,"请输入医生ID:",LABEL);//3 this->titlefy = new
CLabel(42,33,10,2,"按<- -="">翻页",LABEL);//4 this->titlexzsj = new
CLabel(42,35,10,2,"按上 下选择数据",LABEL);//5//编辑框this->editsrysid = new
CEdit(24,12,10,3,"",11,2,1,EDIT);//6//按钮this->btnchaxun = new
CButton(42,12,10,3,"查询",BUTTON); //7this->btnfanhui = new
CButton(9,34,10,3,"返回",BUTTON); //8
//表格表头设置vectorheader;header.push_back("医生ID");header.push_back("医生姓名");header.push_back("职位");header.push_back("所属科室");header.push_back("所属医院");header.push_back("简介");
//添加控件到窗口this->addControl(this->titlehyld);
this->addControl(this->titlehy);this->addControl(this->titlerq);this->addControl(this->titlesrysid);this->addControl(this->titlefy);this->addControl(this->titlexzsj);this->addControl(this->editsrysid);this->addControl(this->btnchaxun);this->addControl(this->btnfanhui);
//创建表格this->table = new Table(5,18,31,10,4,6,header);}
//按键执行响应[可以操作表格;在表格中显示数据]int CAdmindoctorqueryWin::doAction(){char
str[10]={0};map::iterator it;switch(this->focusIndex){case 8: //返回return 15;
//管理医生主界面case
7:for(it=CData::doctorMap.begin();it!=CData::doctorMap.end();it++){itoa(it->second.getID(),str,10);if(strstr(str,this->editsrysid->getContent())!=NULL){
this->table->clearTable(); this->table->show();
CTools::gotoxy(9,22); cout<second.getID()<<ENDL;
cout<second.getName().c_str()<<ENDL;
cout<second.getPosition().c_str()<<ENDL;
cout<second.getDepartment().c_str()<<ENDL;
cout<second.getHospital().c_str()<<ENDL;
cout
16.CAdmindoctoraddWin.h .cpp【管理员新增医生界面】
#ifndef CADMINDOCTORADDWIN_H#define CADMINDOCTORADDWIN_H#include"CWinBase.h"//继承窗口基类#include"CButton.h"//按钮#include "CLabel.h"//标签#include"CEdit.h"//编辑框 //管理员新增医生窗 继承 窗口基类class CAdmindoctoraddWin:public CWinBase{public:CAdmindoctoraddWin();//默认构造~CAdmindoctoraddWin();//析构CAdmindoctoraddWin(int x,int y,int w,int h);//带参构造 int doAction();//按键响应执行[纯虚函数] void showWindow();//显示窗口[虚函数]protected:private: CLabel *titlehyld,*titlehy,*titlerq,*titleysid,*titleysxm,*titlessyy,*titlessks,*titleyszw ,*titlejianjie,*titleslyy,*titlets1,*titlets2,*titlets3;//标签CButton *btnqueding ,*btnfanhui;//按钮CEdit *editysxm,*editssyy,*editssks,*edityszw,*editjianjie;//编辑框}; #endif
#pragma warning(disable :4786)#include"CAdmindoctoraddWin.h"//管理员新增医生窗#include"CTools.h"//工具类#include"CData.h"//公共数据类#include"CDoctor.h"//医生类#includeusing namespace std; //管理员新增医生窗 继承 窗口基类[默认构造]CAdmindoctoraddWin::CAdmindoctoraddWin():CWinBase(){}//析构CAdmindoctoraddWin::~CAdmindoctoraddWin(){} //管理员新增医生窗 继承 窗口基类[带参构造]CAdmindoctoraddWin::CAdmindoctoraddWin(int x,int y,int w,int h):CWinBase(x,y,w,h){//创建控件//标签 this->titlehyld = new CLabel(15,7,34,4,"欢迎来到门诊预约管理系统",LABEL);//0this->titlehy = new CLabel(8,10,10,2,"欢迎,1000管理员",LABEL);//1 this->titlerq = new CLabel(39,10,10,2,"日期",LABEL);//2this->titleysid = new CLabel(9,15,10,2,"医生ID:",LABEL);//3 this->titleysxm = new CLabel(9,18,10,2,"医生姓名",LABEL);//4 this->titlessyy = new CLabel(9,21,10,2,"所属医院",LABEL);//5this->titlessks = new CLabel(9,24,10,2,"所属科室",LABEL);//6this->titleyszw = new CLabel(9,27,10,2,"医生职位",LABEL);//7this->titlejianjie = new CLabel(9,30,10,2,"简介",LABEL);//8//编辑框this->editysxm = new CEdit(21,17,10,3,"",11,3,1,EDIT);//9this->editssyy = new CEdit(21,20,10,3,"",11,2,1,EDIT);//10this->editssks = new CEdit(21,23,10,3,"",11,2,1,EDIT);//11this->edityszw = new CEdit(21,26,10,3,"",11,2,1,EDIT);//12this->editjianjie = new CEdit(21,29,20,4,"",11,3,1,EDIT);//13//按钮this->btnqueding = new CButton(8,33,10,3,"确定",BUTTON); //14this->btnfanhui = new CButton(28,33,10,3,"返回",BUTTON); //15//标签this->titleslyy = new CLabel(25,21,10,2,"省立医院",LABEL);//16this->titlets1 = new CLabel(42,26,10,2,"4:专家;5:主任医师",LABEL);//17this->titlets2 = new CLabel(42,28,10,2,"6:副主任;7:主治医师",LABEL);//18this->titlets3 = new CLabel(42,24,10,2,"8:内科;9:外科",LABEL);//添加控件到窗口中this->addControl(this->titlehyld); this->addControl(this->titlehy);this->addControl(this->titlerq);this->addControl(this->titleysid);this->addControl(this->titleysxm);this->addControl(this->titlessyy);this->addControl(this->titlessks);this->addControl(this->titleyszw);this->addControl(this->titlejianjie); this->addControl(this->editysxm);this->addControl(this->editssyy);this->addControl(this->editssks);this->addControl(this->edityszw);this->addControl(this->editjianjie);this->addControl(this->btnqueding); this->addControl(this->btnfanhui); this->addControl(this->titleslyy);this->addControl(this->titlets1); this->addControl(this->titlets2);this->addControl(this->titlets3); } //按键响应执行 [纯虚函数]int CAdmindoctoraddWin::doAction(){map::iterator it;switch(this->focusIndex){case 15: return 15; //管理医生主界面case 14: //首先输入医生姓名 所属科室 医生职位 简介内容不能为空if(strlen(this->editysxm->getContent())==0||strlen(this->editssks->getContent())==0||strlen(this->edityszw->getContent())==0||strlen(this->editjianjie->getContent())==0){CTools::gotoxy(10,12);cout<<"医生姓名或所属科室或医生职位或简介内容不能为空,请输入"clear();this->editssks->clear();this->edityszw->clear();this->editjianjie->clear();system("pause");return 14;}//要求医生姓名中文 长度2-10位if(strlen(this->editysxm->getContent())<4||strlen(this->editysxm->getContent())>20){cout<<"医生姓名长度要求为2-10位,请重新输入"clear();this->editssks->clear();this->edityszw->clear();this->editjianjie->clear();system("pause");return 14;} //int ID,string name,string pwd,string jianjie,string hospital,//string position,string department,int roleCData::doctorMap.insert(make_pair(CData::Nowdoctor,Doctor(CData::Nowdoctor,this->editysxm->getContent(),"123456",this->editjianjie->getContent(),"省立医院",this->edityszw->getContent(),this->editssks->getContent(),DOCTOR))); CData::addDoctor(Doctor(CData::Nowdoctor,this->editysxm->getContent(),"123456",this->editjianjie->getContent(),"省立医院",this->edityszw->getContent(),this->editssks->getContent(),DOCTOR));CData::Nowdoctor++;CTools::gotoxy(10,25); cout<<"新增医生成功,请稍等"clear();this->editssks->clear();this->edityszw->clear();this->editjianjie->clear();system("pause");return 14;//用户添加医生界面default:break;}return 14;//管理员新增医生界面} //窗口显示[虚函数][显示时间&当前医生的ID]void CAdmindoctoraddWin::showWindow(){//显示大框 显示每个控件CTools::paintWindow(this->startX,this->startY,this->width,this->height);for(int i=0;ictrlCount;i++){//基类指针操作派生类成员函数//虚函数 让每一个子类的函数都能够去调用//通过基类指针 或 引用调用虚函数 触发动态绑定this->ctrlArr[i]->show(); //执行基类的show函数}//显示时间char buf[15]={0};strcpy(buf,CTools::showTime());CTools::gotoxy(this->startX+this->width+6,10);cout<<BUF<<ENDL; 显示当前医生的idctools::gotoxy(22,15);cout<<cdata::nowdoctor<<endl;="" }
17.CAdmindoctormodifyWin.h .cpp【管理员修改医生信息界面】
#ifndef CADMINDOCTORMODIFYWIN_H#define CADMINDOCTORMODIFYWIN_H#include"CWinBase.h"//继承窗口基类#include"CButton.h"//按钮#include "CLabel.h"//标签#include"CEdit.h"//编辑框 //管理员修改医生信息窗 继承 窗口基类class CAdmindoctormodifyWin:public CWinBase{public:CAdmindoctormodifyWin();//默认构造~CAdmindoctormodifyWin();//析构CAdmindoctormodifyWin(int x,int y,int w,int h);//带参构造int doAction();//按键执行响应[纯虚函数]void showWindow();//窗口显示[虚函数]protected:private: CLabel *titlehyld,*titlehy,*titlerq,*titleysid,*titleyzw,*titlexzw,*titleqrzw,*titlets1,*titlets2;//标签CButton *btnqueding ,*btnfanhui;//按钮CEdit *edityzw,*editxzw,*editqrzw,*editysid;//编辑框}; #endif
#include"CAdmindoctormodifyWin.h"//管理员修改医生信息窗#include"CTools.h"//工具类#include"CData.h"//公共数据类#include"CDoctor.h"//医生类#includeusing namespace std;#include#include#include#include//管理员修改医生信息窗 继承窗口基类 [默认构造]CAdmindoctormodifyWin::CAdmindoctormodifyWin():CWinBase(){}//析构CAdmindoctormodifyWin::~CAdmindoctormodifyWin(){}//管理员修改医生信息窗 继承窗口基类 [带参构造]CAdmindoctormodifyWin::CAdmindoctormodifyWin(int x,int y,int w,int h):CWinBase(x,y,w,h){//创建控件//标签 this->titlehyld = new CLabel(15,7,34,4,"修改医生信息窗口",LABEL);//0this->titlehy = new CLabel(8,10,10,2,"欢迎,1000 管理员",LABEL);//1 this->titlerq = new CLabel(39,10,10,2,"日期",LABEL);//2this->titleysid = new CLabel(9,12,10,2,"医生ID",LABEL);//3 this->titleyzw = new CLabel(9,15,10,2,"原职位",LABEL);//4 this->titlexzw = new CLabel(9,18,10,2,"新职位",LABEL);//5this->titleqrzw = new CLabel(9,21,10,2,"确认职位",LABEL);//6//编辑框this->editysid = new CEdit(21,11,10,3,"",4,2,1,EDIT);//7this->edityzw = new CEdit(21,14,10,3,"",1,2,1,EDIT);//8this->editxzw = new CEdit(21,17,10,3,"",1,2,1,EDIT);//9this->editqrzw = new CEdit(21,20,10,3,"",1,2,1,EDIT);//10//按钮this->btnqueding = new CButton(8,23,10,3,"确定",BUTTON); //11this->btnfanhui = new CButton(28,23,10,3,"返回",BUTTON); //12//标签this->titlets1 = new CLabel(42,15,10,2,"4:专家;5:主任医师",LABEL);//13this->titlets2 = new CLabel(42,17,10,2,"6:副主任;7:主治医师",LABEL);//14//添加控件this->addControl(this->titlehyld); this->addControl(this->titlehy);this->addControl(this->titlerq);this->addControl(this->titleysid);this->addControl(this->titleyzw);this->addControl(this->titlexzw);this->addControl(this->titleqrzw);this->addControl(this->editysid);this->addControl(this->edityzw); this->addControl(this->editxzw);this->addControl(this->editqrzw);this->addControl(this->btnqueding); this->addControl(this->btnfanhui);this->addControl(this->titlets1); this->addControl(this->titlets2);} //按键执行响应int CAdmindoctormodifyWin::doAction(){map::iterator it;switch(this->focusIndex){case 12: return 15;//管理员管理医生界面case 11://确认职位//判断输入编辑框内容是否为空if(strlen(this->editysid->getContent())==0||strlen(this->edityzw->getContent())==0||strlen(this->editxzw->getContent())==0||strlen(this->editqrzw->getContent())==0){cout<<"医生id或原职位或新职位或确认职位不能为空,请输入"clear();this->edityzw->clear();this->editxzw->clear();this->editqrzw->clear();system("pause");return 22;}//输入两次职位是否一致if(atoi(this->editxzw->getContent())!=atoi(this->editqrzw->getContent())){cout<<"输入的两次职位不一致,请重新输入"clear();this->edityzw->clear();this->editxzw->clear();this->editqrzw->clear();system("pause");return 22;}//找到输入医生id与数据医生id一致可以修改该医生的信息//if(strcmp(this->editysid->getContent(),it->first)==0)for(it=CData::doctorMap.begin();it!=CData::doctorMap.end();it++){if(atoi(this->editysid->getContent())==it->first){//更新医生map//set方法获取编辑框内容it->second.setPosition(this->editxzw->getContent());//重新文件CData::writeDoctor();CTools::gotoxy(10,25);cout<<"修改医生职位成功"clear();this->edityzw->clear();this->editxzw->clear();this->editqrzw->clear();system("pause");return 22;}} default:break;}return 22;//修改医生职位界面} //窗口显示[虚函数] [显示时间]void CAdmindoctormodifyWin::showWindow(){//显示大框 显示每个控件CTools::paintWindow(this->startX,this->startY,this->width,this->height);for(int i=0;ictrlCount;i++){this->ctrlArr[i]->show(); //执行基类的show函数}//显示时间char buf[15]={0};strcpy(buf,CTools::showTime());CTools::gotoxy(this->startX+this->width+6,10);cout<<BUF<<ENDL; }
18.CAdmindepartmentWin.h .cpp【管理员查询科室界面】
#ifndef CADMINDEPARTMENTWIN_H#define CADMINDEPARTMENTWIN_H#include"CWinBase.h"//继承窗口基类#include"CButton.h"//按钮#include "CLabel.h"//标签#include"CEdit.h"//编辑框#include"CTable.h"//表格 //管理员查询科室窗 继承 窗口基类class CAdmindepartmentWin:public CWinBase{public:CAdmindepartmentWin();//默认构造~CAdmindepartmentWin();//析构CAdmindepartmentWin(int x,int y,int w,int h);//带参构造 int doAction();//按键响应执行[纯虚函数] void showWindow();//显示窗口[虚函数] int WinRun();//窗口运行[虚函数]protected:private: CLabel *titlehyld,*titlehy,*titlerq,*titlesrksid,*titlefy;//标签 CButton *btnchaxun ,*btnfanhui,*btnxzks;//按钮CEdit *editsrksid;//编辑框Table *table;//表格}; #endif
#pragma warning(disable
:4786)#include"CAdmindepartmentWin.h"//管理员查询科室窗#include"CTools.h"//工具类#include"CData.h"//公共数据类#include"CTable.h"//表格类#include#include#include#include#includeusing
namespace std; //管理员查询科室窗 继承
窗口基类[默认构造]CAdmindepartmentWin::CAdmindepartmentWin():CWinBase(){}//析构CAdmindepartmentWin::~CAdmindepartmentWin(){}
//管理员查询科室窗 继承 窗口基类[带参构造]CAdmindepartmentWin::CAdmindepartmentWin(int x,int y,int
w,int h):CWinBase(x,y,w,h){//创建控件//标签 this->titlehyld = new
CLabel(25,7,34,4,"欢迎来到门诊预约管理系统",LABEL);//0this->titlehy = new
CLabel(8,10,10,2,"欢迎,1000管理员",LABEL);//1 this->titlerq = new
CLabel(49,10,10,2,"日期",LABEL);//2this->titlesrksid = new
CLabel(9,13,10,2,"请输入科室ID:",LABEL);//3 this->titlefy = new
CLabel(42,33,10,2,"按<- -="">翻页",LABEL);//4//编辑框this->editsrksid = new
CEdit(24,12,10,3,"",11,2,1,EDIT);//5//按钮this->btnchaxun = new
CButton(42,12,10,3,"查询",BUTTON); //6this->btnxzks = new
CButton(61,12,10,3,"新增科室",BUTTON); //7this->btnfanhui = new
CButton(9,32,10,3,"返回",BUTTON); //8
//表格表头设计vectorheader;header.push_back("科室ID");header.push_back("科室名称");header.push_back("科室说明");//添加控件到窗口中this->addControl(this->titlehyld);
this->addControl(this->titlehy);this->addControl(this->titlerq);this->addControl(this->titlesrksid);this->addControl(this->titlefy);this->addControl(this->editsrksid);this->addControl(this->btnchaxun);this->addControl(this->btnxzks);this->addControl(this->btnfanhui);//表格创建
this->table = new Table(7,18,26,10,4,3,header); } //按键执行响应int
CAdmindepartmentWin::doAction(){map::iterator
it;switch(this->focusIndex){case 8: //返回return 3;//管理员主界面case 6:
//查询for(it=CData::departmentMap.begin();it!=CData::departmentMap.end();it++){if(strstr(it->second.getKsId().c_str(),this->editsrksid->getContent())!=NULL){this->table->clearTable();this->table->show();CTools::gotoxy(9,22);cout<second.getKsId().c_str()<<endl;ctools::gotoxy(26,22);cout<second.getKsName().c_str()<<endl;ctools::gotoxy(43,22);cout
19.CDoctormainWin.h .cpp【医生主界面】
#ifndef CDOCTORMAINWIN_H#define CDOCTORMAINWIN_H#include"CWinBase.h"//继承窗口基类#include"CButton.h"//按钮#include "CLabel.h"//标签#include"CEdit.h"//编辑框 //医生主界面窗 继承 窗口基类class CDoctormainWin:public CWinBase{public:CDoctormainWin();//默认构造~CDoctormainWin();//析构CDoctormainWin(int x,int y,int w,int h);//带参构造int doAction();//按键执行响应protected:private: CLabel *titlehyld,*titlehy,*titlerq;//标签CButton *btngr ,*btnjz,*btntc;//按钮 }; #endif
#include"CDoctormainWin.h"//医生主界面窗#include"CTools.h"//工具类#includeusing namespace std; //医生主界面窗 继承 窗口基类[默认构造]CDoctormainWin::CDoctormainWin():CWinBase(){}//析构CDoctormainWin::~CDoctormainWin(){} //医生主界面窗 继承 窗口基类[带参构造]CDoctormainWin::CDoctormainWin(int x,int y,int w,int h):CWinBase(x,y,w,h){//创建控件//标签 this->titlehyld = new CLabel(15,7,34,4,"欢迎来到门诊预约管理系统",LABEL);//0this->titlehy = new CLabel(8,10,10,2,"欢迎,用户名,角色",LABEL);//1 this->titlerq = new CLabel(29,10,10,2,"日期",LABEL);//2//按钮this->btngr = new CButton(10,11,8,3,"个人中心",BUTTON);//3this->btnjz = new CButton(28,11,10,3,"就诊信息查询",BUTTON); //4this->btntc = new CButton(10,14,8,3,"退出",BUTTON); //5 //添加控件this->addControl(this->titlehyld); this->addControl(this->titlehy);this->addControl(this->titlerq);this->addControl(this->btngr);this->addControl(this->btnjz);this->addControl(this->btntc); } //按键执行响应[纯虚函数]int CDoctormainWin::doAction(){switch(this->focusIndex){case 5: return 2;//按角色登录界面 case 4: return 20;//医生的就诊信息界面default:break;}return 5;//用户主界面}
20.CDoctormedicalinfoWin.h .cpp【医生的就诊信息界面】
#ifndef CDOCTORMEDICALINFOWIN_H#define CDOCTORMEDICALINFOWIN_H#include"CWinBase.h"//继承窗口基类#include"CButton.h"//按钮#include "CLabel.h"//标签#include"CEdit.h"//编辑框#include"CTable.h"//表格 //医生的就诊信息窗 继承 窗口基类class CDoctormedicalinfoWin:public CWinBase{public:CDoctormedicalinfoWin();//默认构造~CDoctormedicalinfoWin();//析构CDoctormedicalinfoWin(int x,int y,int w,int h);//带参构造int doAction();//按键执行响应void showWindow();//显示窗口int WinRun();//窗口运行protected:private: CLabel *titlehyld,*titlehy,*titlerq,*titlefy,*titlexzsj;//标签CButton *btnfanhui,*btnjzjl;//按钮Table *table;//表格}; #endif
#pragma warning(disable
:4786)#include"CDoctormedicalinfoWin.h"//医生的就诊信息窗口#include"CTools.h"//工具类#include"CData.h"//公共数据类#include"CTable.h"//表格类#include#include#include#include#includeusing
namespace std; //医生的就诊信息窗 继承
窗口基类[默认构造]CDoctormedicalinfoWin::CDoctormedicalinfoWin():CWinBase(){}//析构CDoctormedicalinfoWin::~CDoctormedicalinfoWin(){}//医生的就诊信息窗
继承 窗口基类[带参构造]CDoctormedicalinfoWin::CDoctormedicalinfoWin(int x,int y,int w,int
h):CWinBase(x,y,w,h){//创建控件//标签 this->titlehyld = new
CLabel(25,7,34,4,"欢迎来到门诊预约管理系统",LABEL);//0this->titlehy = new
CLabel(8,10,10,2,"欢迎,用户名,角色",LABEL);//1 this->titlerq = new
CLabel(49,10,10,2,"日期",LABEL);//2 this->titlefy = new
CLabel(50,30,10,2,"按<-- --="">翻页",LABEL);//3this->titlexzsj = new
CLabel(50,33,10,2,"按下 上选择数据",LABEL);//4//按钮this->btnfanhui = new
CButton(10,29,8,3,"返回",BUTTON); //5this->btnjzjl = new
CButton(25,29,8,3,"医生就诊记录",BUTTON); //6
//表格表头设计vectorheader;header.push_back("编号");header.push_back("就诊用户ID");header.push_back("状态");
//添加控件到窗口中this->addControl(this->titlehyld);
this->addControl(this->titlehy);this->addControl(this->titlerq);this->addControl(this->titlefy);this->addControl(this->titlexzsj);this->addControl(this->btnfanhui);this->addControl(this->btnjzjl);//创建表格this->table
= new Table(7,14,30,10,4,3,header);} //窗口执行响应[纯虚函数]int
CDoctormedicalinfoWin::doAction(){switch(this->focusIndex){case 5: return
4;//医生主界面case 6: return 21;//医生的就诊信息的就诊记录default:break;}return 20;//医生的就诊信息界面}
//窗口显示 [虚函数]void CDoctormedicalinfoWin::showWindow(){//显示大框
显示每个控件CTools::paintWindow(this->startX,this->startY,this->width,this->height);for(int
i=0;ictrlCount;i++){this->ctrlArr[i]->show(); //执行基类的show函数}char
buf[15]={0};strcpy(buf,CTools::showTime());CTools::gotoxy(this->startX+this->width+6,10);cout<
21.CDoctormedicalrecWin.h .cpp【医生的就诊信息的就诊记录界面】
#ifndef CDOCTORMEDICALRECWIN_H#define CDOCTORMEDICALRECWIN_H#include"CWinBase.h"//继承窗口基类#include"CButton.h"//按钮#include "CLabel.h"//标签#include"CEdit.h"//编辑框#include//医生的就诊信息的就诊记录 继承 窗口基类class CDoctormedicalrecWin:public CWinBase{public:CDoctormedicalrecWin();//默认构造~CDoctormedicalrecWin();//析构CDoctormedicalrecWin(int x,int y,int w,int h);//带参构造int doAction();//按键执行响应[纯虚函数]void showWindow();//窗口显示[虚函数]protected:private: CLabel *titlehyld,*titlehy,*titlerq,*titleyhid,*titleyyms,*titlejzms,*titlets;//标签CButton *btnqueding ,*btnfanhui;//按钮CEdit *edityyms,*editjzms,*edityhid;//编辑框}; #endif
#pragma warning(disable :4786)#include"CDoctormedicalrecWin.h"//医生的就诊信息的就诊记录窗#include"CTools.h"//工具类#include"CData.h"//公共数据类#include"COutpatient.h"//门诊类#includeusing namespace std;#include#include#include#include//医生的就诊信息的就诊记录窗 继承 窗口基类[默认构造]CDoctormedicalrecWin::CDoctormedicalrecWin():CWinBase(){}//析构CDoctormedicalrecWin::~CDoctormedicalrecWin(){}//医生的就诊信息的就诊记录窗 继承 窗口基类[带参构造]CDoctormedicalrecWin::CDoctormedicalrecWin(int x,int y,int w,int h):CWinBase(x,y,w,h){//创建控件//标签 this->titlehyld = new CLabel(15,7,34,4,"欢迎来到门诊预约管理系统",LABEL);//0this->titlehy = new CLabel(8,10,10,2,"欢迎,用户名,角色",LABEL);//1 this->titlerq = new CLabel(39,10,10,2,"日期",LABEL);//2this->titleyhid = new CLabel(9,14,10,2,"用户ID:",LABEL);//3 this->titleyyms = new CLabel(9,17,10,2,"预约描述:",LABEL);//4 this->titlejzms = new CLabel(9,20,10,2,"就诊描述:",LABEL);//5//编辑框this->edityhid = new CEdit(22,13,10,3,"",11,2,1,EDIT);//6this->edityyms = new CEdit(22,16,10,3,"",11,3,1,EDIT);//7this->editjzms = new CEdit(22,19,14,3,"",18,3,1,EDIT);//8//按钮this->btnqueding = new CButton(10,23,8,3,"确定",BUTTON);//9this->btnfanhui = new CButton(28,23,10,3,"返回",BUTTON); //10//标签 this->titlets = new CLabel(42,17,10,2,"请用中文填写预约描述以及就诊描述",LABEL);//11 //添加控件到窗口界面中this->addControl(this->titlehyld); this->addControl(this->titlehy);this->addControl(this->titlerq);this->addControl(this->titleyhid);this->addControl(this->titleyyms);this->addControl(this->titlejzms);this->addControl(this->edityhid);this->addControl(this->edityyms); this->addControl(this->editjzms); this->addControl(this->btnqueding);this->addControl(this->btnfanhui);this->addControl(this->titlets); } //窗口执行响应[纯虚函数]int CDoctormedicalrecWin::doAction(){map::iterator it;switch(this->focusIndex){case 10: return 20; //医生就诊信息界面case 9: //确定//判断编辑框内容是否为空if(strlen(this->edityhid->getContent())==0||strlen(this->edityyms->getContent())==0||strlen(this->editjzms->getContent())==0){CTools::gotoxy(10,25);cout<<"用户id或预约描述或就诊描述不能为空"clear();this->edityyms->clear();this->editjzms->clear();system("pause");return 21;}for(it=CData::outpatientMap.begin();it!=CData::outpatientMap.end();it++){if(strcmp(this->edityhid->getContent(),it->second.getPhoneNum().c_str())==0){it->second.setDescribeU(this->edityyms->getContent());it->second.setDescribeD(this->editjzms->getContent());CData::writeOutpatient();CTools::gotoxy(10,25);cout<<"预约描述,就诊描述已填入"clear();this->edityyms->clear();this->editjzms->clear();system("pause");return 21;}/*else{CTools::gotoxy(10,25);cout<<"电话不匹配请重新输入"clear();this->edityyms->clear();this->editjzms->clear();system("pause");return 21;}*/}default:break;}return 21;} //窗口显示 [虚函数]void CDoctormedicalrecWin::showWindow(){//显示大框 显示每个控件CTools::paintWindow(this->startX,this->startY,this->width,this->height);for(int i=0;ictrlCount;i++){this->ctrlArr[i]->show(); //执行基类的show函数}char buf[15]={0};strcpy(buf,CTools::showTime());CTools::gotoxy(this->startX+this->width+6,10);cout<<BUF<<ENDL; }
标签:
相关推荐:
最新新闻:
- 安徽职业技术学院学计算机要多少分?附历年录取分数线|今日热门
- 天天快播:PPTV如何观看节目?PPTV观看节目教程
- 华为手机耳返功能怎么设置?华为手机耳返功能操作教程
- 手机怎么恢复出厂设置?手机出厂设置的方法
- 时讯:【源码展示】门诊预约系统项目界面功能实现11.CMain
- 世界快资讯:Win7打印机print spooler自动停止怎么办?解决方法
- 操作系统有什么用?操作系统的作用与功能介绍
- macOS Big Sur支持机型有哪些?macOS Big Sur支持机型介绍|环球头条
- 【设计网页】不同类型的网页有什么区别?|天天滚动
- 什么是Config?spring-cloud统一配置中心组件流程图_世界微资讯
- 怎么把pdf文件转换成word?转换方法技巧
- 世界微资讯!如何在mac系统中使用苹果的键盘?使用教程
- 世界头条:excel如何筛选?excel表格筛选数据方法技巧
- java-version升级的JDK 到底是怎么回事?
- excel如何利用函数公式?详细操作步骤 环球观天下
- 【报资讯】TCPclient工作模式设置方法及调试方法
- 环球新资讯:如何开通免费Gmail企业邮箱?Gmail企业邮箱开通方法
- 全球播报:MindManager是什么?MindManager下载和使用
- 实施运维企业面试题有哪些?试题及答案
- 微信电脑版如何安装?pc端微信安装步骤_今日最新
- 天天速读:怎么用折800积分?折800积分使用方法
- 多个顺心捷达的快递单号怎么批量查询?快速查询顺心捷达物流
- 微信HD for iPad版怎么不越狱安装?方法步骤如下-世界短讯
- 电脑键盘f1到f12都有什么作用?电脑f1到f12的作用详解
- 世界热资讯!hkc显示器怎么样?hkc显示器介绍方法
- HTTP协议有什么作用?HTTP协议作用介绍-每日观点
- 网上阅卷系统服务器是什么?网上阅卷系统简要概述_环球报道
- PSVita有中文语言吗?PSVita支持即时截图功能吗?
- 麦肯锡发布2021中国消费者报告:全球增长新引擎|新视野
- 当前滚动:cr20323v纽扣电池有哪些用途?cr20323v纽扣电池应用介绍
- 《潜行者2》新实机预告明早3点发布
- 有功功率和无功功率有什么区别?两者的区别介绍|全球聚焦
- 世界速读:cmcc无线网络怎么用?cmcc无线网络设置方法
- thinkpad笔记本怎么样?联想ThinkPad T540p首选
- 推荐12本好看的高干文 每本都值得看三次
- SQL Server developer和enterprise有什么区别?各个版本的定义
- 世界视讯!卖垃圾袋的“财迷”小子 37亿美元身家跻身前400强
- 惠普m1005mfp怎么样?惠普m1005mfp性能评测-世界热推荐
- 从零开始学打字的软件 金山打字通生死时速游戏介绍-焦点资讯
- 全球新动态:百度进军日本市场 已成日本第四大独立搜索引擎
- 环球视讯!四个圈是什么车?奥迪车标背景介绍
- 焦点资讯:测试代码:如何玩转Lua内存回收?
- 未能连接驱动人生服务器怎么办?驱动人生5wifi共享失败解决方法_焦点快报
- 今日快讯:《Eximius:抢占前线》第三赛季“突破”预告片
- 《利刃出鞘2》成网飞圣诞周冠军 观看时长8210万小时
- 【环球新要闻】卡梅隆确认《阿凡达》要拍7部 《阿凡达 3》&《阿凡达 4》已经开拍
- 精选!宏碁新款游戏本曝光 搭载RTX 4080显卡
- 明年游戏本起飞 RTX4080移动版跑分曝光
- 全球速看:真我GT Neo 5曝光:240W闪充拿捏了!
- 1月3日见!NV要发新显卡 你买不买?|全球播报
- 动画《尼尔:机械纪元1.1a》发布新预告确定主题歌
- 元宇宙开局不利,2022年VR头戴设备销售下滑|全球消息
- 石油业要阻止暴利税!埃克森美孚正式起诉欧盟 当前热文
- 每日焦点!无线连接电视全景声 LG发布新回音壁旗舰
- 环球报道:【渠道那些事】1600元的RTX 3060显卡能买么?
- 200Hz高刷+1ms响应 30寸带鱼屏显示器949元 环球热议
- CES 2023宏碁新款轻薄本曝光 搭载i5-1350P处理器
- 天天即时看!CPU太落后!任天堂决定砍掉Switch Pro:准备真正的硬件迭代
- 环球速看:节奏游戏《Bits & Bops》众筹成功将推出Switch版
- 世界滚动:Switch《闪电十一人》支持多种操作 2月还有新情报
- 速看:索尼官宣CES 2023全球发布会时间:PS VR2有望亮相!
- 官方立减 天猫年货节“跨店满减””预售膨胀金“全取消:速讯
- 全球最资讯丨CES 2023前夕 联想发布新一代ThinkPad X1
- 全是马屁精 马斯克被指出身边缺乏持不同观点的人
- 天天头条:售价高达6000元 这些“数码口罩”刷新了我的认知
- 要闻:Epic喜加一:《致命躯壳》免费领取
- 全球球精选!PS4模拟器fpPS4首次能够以可接受帧率运行3D游戏
- 每日速递:NVIDIA证实将在1/3展示40移动GPU和4070Ti
- 外媒PC Gamer:不会再有孤岛危机3这样的显卡杀手了
- 弹幕射击《式神之城2》明年4月13日登陆Switch
- 迈向八连跌?特斯拉血流不止,盘前一度跌近4%,势创最长连跌纪录_全球即时看
- 全球头条:一个时代的结束!负利率债券将成为历史
- moto razr 2022宣布调价至4999元 立减1000元
- 快资讯丨《尼尔机械纪元》TV动画新预告:2B老婆又美又飒!
- 环球要闻:国产生存rogue《通神榜》上架Steam 明年Q1发售
- “数字·进化”——2022数字化发展峰会圆满落幕_精彩看点
- 直降1000!moto razr2022折叠屏降至4999元起
- 特斯拉无线充电垫开启预售:苹果曾开发类似产品
- 一人开发的恐怖动作RPG《埃斯滕塞尔》2023年1月登陆Steam
- 当前资讯!小米mini主机卖爆了:i5核心卖2799
- 国产操作系统盘399元开售:插上就是双系统
- 200多元就能买到1Tb的固态SSD了-每日关注
- 卡梅隆自曝《阿凡达2》10分钟删减镜头
- 李子柒将复出登微博热搜 归来江湖会变天吗?:全球视讯
- 2022年全球最帅面孔出炉:亨利·卡维尔第一 内地众流量上榜