问题描述:
请设计一个职工信息管理程序,以方便人事部门对本单位职工的管理,该程序应该具有以下功
能:
(1)能从键盘输入职工的信息 。
(2)给定职工号,显示职工的信息。
(3)给定工作部门,显示该部门的职工信息。
(4)给定职工号,修改职工的信息。
(5)给定职工号,删除职工信息。
题目要求:
(1)按照分析、设计、编码、调试、测试的软件过程完成这个应用程序。
(2)职工信息应该包含职工号、姓名、工作部门、职称、入厂时间、工资。
(3)为程序设计windows 窗口,在该窗口上以按钮的形式为用户提供“菜单”,通过点击各个功
能项对应的按钮完成操作。
输入要求:
(1)用户可以根据需求,选定相应的操作项目。进入每个操作后,通过窗口的文本框,从键盘输
入相应的信息。程序根据用户输入的信息完成相应的处理,实现要求的功能。
(2)能对输入的数据进行简单的校验,例如,入厂时间必须是合法的日期格式,职工号是唯一的
(一个职工号对应一个职工的职工信息)。
输出要求:
(1)应用程序运行后,要在屏幕上显示一个按钮形式的“菜单”。
(2)要求用户输入数据时,给出清晰、明确的提示信息,包括输入的数据内容、格式以及结束方
式等。
(3)在程序完成处理后,要清楚地给出程序的处理结果。例如,在给定职工号删除职工信息时,
如果该职工不存在,要提示没能删除,如果删除成功要提示删除成功。
实现要求:
(1)在程序中使用链表存储职工信息。
(2)采用模块化程序设计的方法,将程序中的各项功能用函数实现。
提示:
(1)使用结构体表示职工信息,一个结点保存一条职工信息。
扩展功能:
(1)提供一些统计功能。例如统计每个部门的人数,统计平均工资、统计各职称的人数。
(2)职工信息从文件读入。
(3)将职工信息保存到文件中。
代码如下:
#include <windows.h>
#include<string.h>
#include<stdio.h>
#include"resource.h"
LRESULT WINAPI WinProc(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);//函数声明
/* 基本功能 */
void initWorker();
void addWorker();
void showAllInfo();
void clearText();
void clearCache();
void deleteWorker();
void searchWorker();
void modifyWorker();
void searchDepartmentWorker();
void showFormat(struct worker *p);
void saveLocalFile();
void readLocalFile();
void statisticsInfo(); struct inputhwnd
{
int x1;
int x2;
int x3;
int x4;
int menu_name;
}hwndArray[]= {{, , , ,NUM_INPUT},{, , , ,NAME_INPUT},{, , , ,DEPART_INPUT},
{, , , ,JOBTITLE_INPUT},{, , , ,YEAR_INPUT},{, , , ,WAGE_INPUT},
{, , , ,MONTH_INPUT},{, , , ,DATE_INPUT},{, , , ,BIGTEXTBOX}};
/* 按钮 结构体 */
struct inputhwndbutton
{
char buttonName[];
int x1;
int x2;
int x3;
int x4;
int buttonNum;
}buttonArray[]={{"添加职工",,,,,ADD_BUTTON},{"按职工号查询",,,,,SEARCHNUM_BUTTON},{"修改信息",,,,,MODIFY_BUTTON},
{"删除职工",,,,,DELETE_BUTTON},{"显示所有职工信息",,,,,SHOWINFO_BUTTON},{"按部门查询",,,,,SEARCHDEPART_BUTTON},
{"清空显示",,,,,CLEARTEXT_BUTTON},{"版权声明",,,,,COPYRIGHT_BUTTON},{"退出程序",,,,,EXIT_BUTTON},
{"保存到本地",,,,,SAVELOCALFILE_BUTTON},{"从本地读",,,,,READLOCALFILE_BUTTON},{"统计",,,,,STATISTICS_BUTTON}};
/* 矩形框 结构体 */
struct showrect
{
char rectName[];
int top;
int right;
int bottom;
int left;
}rectArray[]={{"[ 职工信息输入框 ]",,,,},{"职工号:",,,,},{"姓名:",,,,},
{"工作部门:",,,,},{"职称:",,,,},{"入厂时间:",,,,},
{"工资:",,,,},{"年",,,,},{"月",,,,},{"日",,,,}};
RECT rect[];
HDC hDC;
HWND hWnd;
PAINTSTRUCT paint;
static char str_num[],str_name[],str_depart[],str_jobTitle[],str_year[],str_month[],str_date[],str_wage[],str_showAll[];
char title[]={"职工号\t\t姓名\t\t工作部门\t\t\t职称\t\t入厂时间\t\t工资\r\n\r\n"};
struct worker
{
long num; //职工号
char name[]; //姓名
char department[];//工作部门
char jobTitle[]; //职称
int year;
int month;
int date;
long wage; //工资
worker *next;
};
struct worker *headp;
void initWorker()
{
headp = new worker;
headp->next=NULL;
}
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)
{
char *cName = "myWindow";//定义个字符指针表示窗口类的名字
WNDCLASS wc;//定义变量
MSG Msg;
wc.cbClsExtra = ;
wc.cbWndExtra = ;
wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);;//设置窗口背景为白色
wc.hCursor = NULL;//窗口的光标不设置
wc.hIcon = NULL;
wc.hInstance = hInstance;//当前程序的句柄,hInstance是由主函数传递
wc.lpfnWndProc = WinProc;//窗口处理过程的窗口函数。
wc.lpszClassName =(LPSTR)cName;//窗口类的名字。
wc.lpszMenuName = NULL;//目录名,不设置
wc.style = CS_HREDRAW | CS_VREDRAW; //窗口类的风格
RegisterClass(&wc);//在系统中注册窗口
hWnd = CreateWindow(cName,TEXT("职工管理程序"),WS_OVERLAPPEDWINDOW,, , , ,NULL, NULL, hInstance, NULL) ;
ShowWindow(hWnd,nShowCmd);//显示窗口
UpdateWindow(hWnd);//更新窗口
initWorker();
while(GetMessage(&Msg,NULL,,))
{
TranslateMessage(&Msg);//翻译消息
DispatchMessage(&Msg);//分派消息
}
return Msg.message;//程序结束后返回消息
}
LRESULT WINAPI WinProc(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam)
{//处理消息过程
static HWND btnHwnd;
static HWND inputHwnd[];
static HWND hwndbutton[];
switch(Msg)//对消息进行判断
{
case WM_PAINT:
hDC=BeginPaint(hWnd,&paint);//获取设备上下文
for(int i =;i<;i++)
{
rect[i].top = rectArray[i].top;
rect[i].right = rectArray[i].right;
rect[i].bottom = rectArray[i].bottom;
rect[i].left = rectArray[i].left;
DrawText(hDC,rectArray[i].rectName,-,&rect[i],DT_SINGLELINE|DT_LEFT|DT_VCENTER);
}
EndPaint(hWnd,&paint);
return ;
case WM_CREATE: //响应窗口的创建事件
//gg(((LPCREATESTRUCT) lParam) -> hInstance);
for(int i = ;i<;i++)
{
inputHwnd[i]=CreateWindow(TEXT("edit"),NULL,WS_CHILD |WS_VISIBLE|WS_BORDER|ES_LEFT|ES_MULTILINE,hwndArray[i].x1,hwndArray[i].x2,hwndArray[i].x3,hwndArray[i].x4,hWnd,(HMENU)hwndArray[i].menu_name,((LPCREATESTRUCT) lParam)->hInstance,NULL);
}
for(int i = ;i<;i++)
{
hwndbutton[i]=CreateWindow(TEXT("BUTTON"),buttonArray[i].buttonName,WS_CHILD|WS_VISIBLE,buttonArray[i].x1,buttonArray[i].x2,buttonArray[i].x3,buttonArray[i].x4,hWnd,(HMENU)buttonArray[i].buttonNum,((LPCREATESTRUCT) lParam) -> hInstance,NULL);
}
return ;
case WM_COMMAND://响应命令
{
switch(LOWORD(wParam))
{
case ADD_BUTTON:
{
clearCache();
addWorker();
return ;
}
case SEARCHNUM_BUTTON:
{
clearCache();
searchWorker();
return ;
}
case MODIFY_BUTTON:
{
clearCache();
modifyWorker();
return ;
}
case DELETE_BUTTON:
{
clearCache();
deleteWorker();
return ;
}
case SHOWINFO_BUTTON:
{
clearCache();
showAllInfo();
return ;
}
case SEARCHDEPART_BUTTON:
{
clearCache();
searchDepartmentWorker();
return ;
}
case CLEARTEXT_BUTTON:
{
clearCache();
clearText();
return ;
}
case COPYRIGHT_BUTTON:
{
MessageBox(NULL,TEXT("本程序归属CCSoft所有,并保留一切权力,任何\n个人或者单位必须经过CCSoft的个人授权、不限\n于书面形式。如有侵权行为,必当追究。"),TEXT("版权声明"),MB_OK);
return ;
}
case EXIT_BUTTON:
{
PostQuitMessage();//退出消息队列
return ;//返回0,结束函数
}
/* 扩展功能:保存在本地 */
case SAVELOCALFILE_BUTTON:
{
clearCache();
saveLocalFile();
return ;
}
/* 扩展功能:写在本地 */ /**fun()[];*/
case READLOCALFILE_BUTTON:
{
clearCache();
readLocalFile();
/* 用函数指针的方式 */
/*fun()[3]*/
return ;
}
/* 扩展功能:简单的统计 */
case STATISTICS_BUTTON:
{
clearCache();
statisticsInfo();
return ;
}
}
return ;
}
case WM_DESTROY://如果是点击关闭窗口时的消息
PostQuitMessage();//退出消息队列
return ;//返回0,结束函数
}
//如果是其余的消息,调用默认消息处理函数,将消息该函数处理并将返回值返回
return DefWindowProc(hWnd,Msg,wParam,lParam);
}
void clearText()
{ SetDlgItemText(hWnd,NUM_INPUT,str_num);
SetDlgItemText(hWnd,NAME_INPUT,str_name);
SetDlgItemText(hWnd,DEPART_INPUT,str_depart);
SetDlgItemText(hWnd,JOBTITLE_INPUT,str_jobTitle);
SetDlgItemText(hWnd,YEAR_INPUT,str_year);
SetDlgItemText(hWnd,MONTH_INPUT,str_month);
SetDlgItemText(hWnd,DATE_INPUT,str_date);
SetDlgItemText(hWnd,WAGE_INPUT,str_wage);
SetDlgItemText(hWnd,BIGTEXTBOX,str_showAll);
}
void gg( HINSTANCE hInstance)
{ } void clearCache()
{
ZeroMemory(str_num,sizeof(str_num));
ZeroMemory(str_name,sizeof(str_name));
ZeroMemory(str_depart,sizeof(str_depart));
ZeroMemory(str_jobTitle,sizeof(str_jobTitle));
ZeroMemory(str_year,sizeof(str_year));
ZeroMemory(str_month,sizeof(str_month));
ZeroMemory(str_date,sizeof(str_date));
ZeroMemory(str_wage,sizeof(str_wage));
ZeroMemory(str_showAll,sizeof(str_showAll));
}
void addWorker()
{
char str_temp[];
ZeroMemory(str_temp,sizeof(str_temp));
struct worker *newworker;
struct worker *assistp,*followp;
followp=headp;
assistp=headp->next;
newworker = new worker;
GetDlgItemText(hWnd,NUM_INPUT,str_num,sizeof(str_num)/sizeof(char));
newworker->num = atol(str_num);
if(newworker->num == || newworker->num<)
{
MessageBox(NULL,TEXT("保存失败!输入职工号不合法!请检查输入信息"),TEXT("系统提示"),MB_OK);
delete newworker;
}
else
{
while(assistp!=NULL && assistp->num!=newworker->num)
{
assistp=assistp->next;
followp=followp->next;
}
if(assistp==NULL)
{
GetDlgItemText(hWnd,NAME_INPUT,newworker->name,sizeof(str_num)/sizeof(char));
GetDlgItemText(hWnd,DEPART_INPUT,newworker->department,sizeof(str_num)/sizeof(char));
GetDlgItemText(hWnd,JOBTITLE_INPUT,newworker->jobTitle,sizeof(str_num)/sizeof(char));
GetDlgItemText(hWnd,YEAR_INPUT,str_year,sizeof(str_num)/sizeof(char));
GetDlgItemText(hWnd,MONTH_INPUT,str_month,sizeof(str_num)/sizeof(char));
GetDlgItemText(hWnd,DATE_INPUT,str_date,sizeof(str_num)/sizeof(char));
GetDlgItemText(hWnd,WAGE_INPUT,str_wage,sizeof(str_num)/sizeof(char));
newworker->wage=atoi(str_wage);
newworker->year=atoi(str_year);
newworker->month=atoi(str_month);
newworker->date=atoi(str_date);
newworker->next = NULL;
if(newworker->year< || newworker->year> || newworker->month< || newworker->month > || newworker->date < ||newworker->date>)
{
MessageBox(NULL,TEXT("保存失败!您输入的日期不合法,请检查职工信息,并重试!"),("系统提示"),MB_OK);
delete newworker;
}
else if(newworker->wage< | newworker->wage > )
{
MessageBox(NULL,TEXT("保存失败!您输入的工资不合法,请检查职工信息,并重试!"),TEXT("系统提示"),MB_OK);
delete newworker;
}
else
{
/* 理清楚概念不要挂错了地方。 */
followp->next=newworker;//将指向首节点的指针,向右移动
followp=followp->next;
MessageBox(NULL,TEXT("保存成功!"),TEXT("系统提示"),MB_OK);
}
}
else
{
strcat(str_temp,"保存失败!职工号为");
ltoa(newworker->num,str_num,);
strcat(str_temp,str_num);
strcat(str_temp,"的职工已存在,请勿重复保存!");
MessageBox(NULL,str_temp,"系统提示",MB_OK);
delete newworker;
}
}
}
void showAllInfo()
{
int flag = ;
worker *searchp;
searchp=headp->next;
if(searchp==NULL)
{
MessageBox(NULL,TEXT("请先输入职工信息!"),TEXT("系统提示"),MB_OK);
}
strcat(str_showAll,title);
while(searchp!=NULL)
{
flag = ;
showFormat(searchp);
searchp=searchp->next;
}
if(flag==)
{
SetDlgItemText(hWnd,,str_showAll);
}
}
/* 函数名:showFormat(struct worker *p)
* 用来统一文本输出格式
为什么当初用那种显示方式 主要是因为简单,但是对于用户来说 可能影响了用户的使用体验。
*/
void showFormat(struct worker *p)
{
ltoa(p->num,str_num,);
strcat(str_showAll,str_num);
/* 该判断 用来对齐 字符串 */
if(strlen(str_num)<)
{
//MessageBox(NULL,TEXT("测试判断"),TEXT("提示"),MB_OK);
strcat(str_showAll,"\t");
}
strcat(str_showAll,"\t");
strcat(str_showAll,p->name);
strcat(str_showAll,"\t\t");
strcat(str_showAll,p->department);
if(strlen(p->department)<)
{
strcat(str_showAll,"\t\t\t");
}
else
{
strcat(str_showAll,"\t\t");
}
//strcat(str_showAll,"\t");
strcat(str_showAll,p->jobTitle);
strcat(str_showAll,"\t\t");
ltoa(p->year,str_year,);
strcat(str_showAll,str_year);
strcat(str_showAll,"年");
ltoa(p->month,str_month,);
strcat(str_showAll,str_month);
strcat(str_showAll,"月");
ltoa(p->date,str_date,);
strcat(str_showAll,str_date);
strcat(str_showAll,"日");
strcat(str_showAll,"\t");
ltoa(p->wage,str_wage,);
strcat(str_showAll,str_wage);
strcat(str_showAll,"\r\n");
strcat(str_showAll,"\r\n");
}
void deleteWorker()
{
char str_temp[];
ZeroMemory(str_temp,sizeof(str_temp));
long s;
worker *deletep,*shadowp;
shadowp=headp;
deletep=headp->next;
GetDlgItemText(hWnd,NUM_INPUT,str_num,sizeof(str_num)/sizeof(char));
s=atol(str_num);
if(s== || s<)
{
MessageBox(NULL,TEXT("请输入正确的职工号再删除!"),TEXT("系统提示"),MB_OK);
}
else
{
while(deletep!=NULL && deletep->num!=s)
{
deletep=deletep->next;
shadowp=shadowp->next;
}
if(deletep!=NULL)
{
if(deletep->next==NULL)
{
shadowp->next =NULL;
delete deletep;;
MessageBox(NULL,TEXT("删除成功"),TEXT("系统提示"),MB_OK);
}
else
{
shadowp->next=deletep->next;
delete deletep;
MessageBox(NULL,TEXT("删除成功"),TEXT("系统提示"),MB_OK);
}
}
else
{
strcat(str_temp,"职工号为:");
strcat(str_temp,str_num);
strcat(str_temp,"的职工不存在,无法删除!");
MessageBox(NULL,str_temp,TEXT("系统提示"),MB_OK);
}
}
}
void searchWorker()
{
long s;
char str_temp[];
ZeroMemory(str_temp,sizeof(str_temp));
struct worker *assistp;
assistp=headp->next;
GetDlgItemText(hWnd,NUM_INPUT,str_num,sizeof(str_num)/sizeof(char));
s=atol(str_num);
if(s== || s<)
{
MessageBox(NULL,TEXT("请输入正确的职工号!"),TEXT("系统提示"),MB_OK);
}
else
{
/* long s = atol(str1); 直接用!=进行比较 没毛病 */ while(assistp!=NULL && assistp->num!=s)
{
assistp=assistp->next;
}
if(assistp!=NULL)
{
strcat(str_showAll,title);
showFormat(assistp);
SetDlgItemText(hWnd,,str_showAll);
}
else
{
strcat(str_temp,"职工号为:");
strcat(str_temp,str_num);
strcat(str_temp,"的职工不存在!");
MessageBox(NULL,str_temp,TEXT("系统提示"),MB_OK);
}
} }
void modifyWorker()
{
struct worker *assistp;
assistp=headp->next;
char str_temp[];
long s;
GetDlgItemText(hWnd,NUM_INPUT,str_num,sizeof(str_num)/sizeof(char));
s=atol(str_num);
if(s== || s<)
{
MessageBox(NULL,TEXT("请输入正确的职工号!"),TEXT("系统提示"),MB_OK);
}
else
{
while(assistp!=NULL && assistp->num!=s)
{
assistp=assistp->next;
}
if(assistp!=NULL)
{
GetDlgItemText(hWnd,NAME_INPUT,assistp->name,sizeof(str_num)/sizeof(char));
GetDlgItemText(hWnd,DEPART_INPUT,assistp->department,sizeof(str_num)/sizeof(char));
GetDlgItemText(hWnd,JOBTITLE_INPUT,assistp->jobTitle,sizeof(str_num)/sizeof(char));
//GetDlgItemText(hWnd,5,newworker->date,sizeof(str1)/sizeof(char));
GetDlgItemText(hWnd,YEAR_INPUT,str_year,sizeof(str_num)/sizeof(char));
GetDlgItemText(hWnd,WAGE_INPUT,str_wage,sizeof(str_num)/sizeof(char));
GetDlgItemText(hWnd,MONTH_INPUT,str_month,sizeof(str_num)/sizeof(char));
GetDlgItemText(hWnd,DATE_INPUT,str_date,sizeof(str_num)/sizeof(char));
assistp->wage = atoi(str_wage);
assistp->year = atoi(str_month);
assistp->month = atoi(str_month);
assistp->date = atoi(str_date);
MessageBox(NULL,TEXT("修改成功!"),TEXT("系统提示"),MB_OK);
}
else
{
strcat(str_temp,"职工号为:");
strcat(str_temp,str_num);
strcat(str_temp,"的职工不存在,无法修改其信息!");
MessageBox(NULL,str_temp,TEXT("系统提示"),MB_OK);
}
}
assistp=headp->next;
} void searchDepartmentWorker()
{
int flag= ;
worker *searchp;
searchp=headp->next;
GetDlgItemText(hWnd,DEPART_INPUT,str_depart,sizeof(str_num)/sizeof(char));
if(str_depart=="\0")
{
MessageBox(NULL,TEXT("请输入正确的部门!"),TEXT("系统提示"),MB_OK);
}
else
{
strcat(str_showAll,title);
while(searchp!=NULL)
{
if(strcmp((searchp->department),str_depart)==)
{
flag =;
showFormat(searchp);
/* 如果 和比对的 字符串 相等的话 , 向前移动一个在进行比较 */
searchp=searchp->next; }
else
{
/* 如果 和比对的 字符串 不相等的话 , 向前移动一个在进行比较 */
/* 注意这个不能漏,必定出错。 */
searchp=searchp->next;
}
}
SetDlgItemText(hWnd,,str_showAll);
//searchp=headp->next;
if(flag == )
{
MessageBox(NULL,TEXT("没有找到该部门的职工!"),TEXT("系统提示"),MB_OK);
}
}
} /* 扩展功能 */
void saveLocalFile()
{
int flag = ;
FILE *fp;
fp=fopen("C:\\workerDatabase.txt","w");
if(fp==NULL)
{
MessageBox(NULL,TEXT("无法保存在本地!"),TEXT("系统警告"),MB_OK);
exit();
}
worker *searchp;
searchp=headp->next;
if(searchp==NULL)
{
MessageBox(NULL,TEXT("职工信息为空!请先录入职工信息!"),TEXT("系统警告"),MB_OK);
exit();
}
while(searchp!=NULL)
{
fprintf(fp,"%ld %s %s %s %d %d %d %ld\n",searchp->num,searchp->name,searchp->department,searchp->jobTitle,searchp->year,searchp->month,searchp->date,searchp->wage);
searchp=searchp->next;
flag = ;
}
fclose(fp);
if(flag == )
{
MessageBox(NULL,TEXT("写入本地成功!"),TEXT("系统提示"),MB_OK);
}
else
{
MessageBox(NULL,TEXT("写入本地失败!"),TEXT("系统提示"),MB_OK);
}
}
void readLocalFile()
{
FILE *p;
int flag = ;
struct worker *newworker;//用来保存读入的新职员
struct worker *followp;//用来移动指针
followp=headp;
worker *shadowp;//定义一个影子指针 用来指向 倒数第二个节点。因为从文本读入的时候最后一行是空行,要丢弃。
if((p=fopen("C:\\workerDatabase.txt","r"))==NULL)
{
MessageBox(NULL,TEXT("打开本地数据文件失败!"),TEXT("系统警告"),MB_OK);
exit();
}
while(!feof(p))
{
newworker = (struct worker*)malloc(sizeof(struct worker ));
fscanf(p,"%ld %s %s %s %d %d %d %ld",&newworker->num,newworker->name,newworker->department,newworker->jobTitle,&newworker->year,&newworker->month,&newworker->date,&newworker->wage);
newworker->next = NULL;
followp->next = newworker;
shadowp = followp;
followp = newworker;
/* 在这里-842156451是用来标记一个未赋值的变量。利用这一点,来判断读取是否成功*/
if(newworker->wage != -)
{
flag = ;
}
}
/* 删除最后一个节点*/
delete newworker;
followp = shadowp;
shadowp->next = NULL;
if(flag == )
{ MessageBox(NULL,TEXT("从本地读取到程序成功!"),TEXT("系统提示"),MB_OK);
}
else
{
MessageBox(NULL,TEXT("从本地读取到程序失败"),TEXT("系统提示"),MB_OK);
} fclose(p);
}
void statisticsInfo()
{
char temp1[],temp2[];
int NumOfPeoCount=;
double sumWage = ;
double averageWage=;
worker *searchp;
searchp=headp->next;
if(headp->next==NULL)
{
MessageBox(NULL,TEXT("请先输入职工信息!"),TEXT("系统提示"),MB_OK);
}
else
{
while(searchp!=NULL)
{
NumOfPeoCount++;
sumWage += searchp->wage;
searchp=searchp->next;
}
averageWage = sumWage/(double)NumOfPeoCount;
ltoa(NumOfPeoCount,temp1,);
ltoa(averageWage,temp2,);
strcat(str_showAll,"总计有:");
strcat(str_showAll,temp1);
strcat(str_showAll,"人\t");
strcat(str_showAll,"平均工资为:");
strcat(str_showAll,temp2);
strcat(str_showAll,"\t\n");
SetDlgItemText(hWnd,,str_showAll);
}
}
resource.h头文件如下:
/* INPUT NUMBER */
#define NUM_INPUT 1
#define NAME_INPUT 2
#define DEPART_INPUT 3
#define JOBTITLE_INPUT 4
#define YEAR_INPUT 5
#define WAGE_INPUT 6
#define MONTH_INPUT 7
#define DATE_INPUT 8
#define BIGTEXTBOX 10
/* BUTTON NUMBER */
#define ADD_BUTTON 13
#define SEARCHNUM_BUTTON 14
#define MODIFY_BUTTON 15
#define DELETE_BUTTON 16
#define SHOWINFO_BUTTON 17
#define SEARCHDEPART_BUTTON 18
#define CLEARTEXT_BUTTON 19
#define COPYRIGHT_BUTTON 20
#define EXIT_BUTTON 21
#define SAVELOCALFILE_BUTTON 100
#define READLOCALFILE_BUTTON 101
#define STATISTICS_BUTTON 111