当前位置:首页 > 公司人事管理系统代码和文档
{
char ch; do {
Person *p1=head->next; int S_num;
cout << \请输入你要查寻员工的编号:\ cin >> S_num; while(p1!=NULL) {
if(p1->Get_NO()==S_num) {
cout << \该员工信息为:\ p1->Show(); break; }
p1=p1->next; }
cout << \ cin >> ch;
}while(ch=='Y'||ch=='y'); }
void Boss::Staff()//员工功能 { cout << \请登录:\ Person *p1=head->next; if(p1==NULL) { cout << \系统未导入信息!!\ } int S_num; char name[10]; cout << \帐号:\ cin >> name; while(p1!=NULL) { if(strcmp(p1->Get_Name(),name)==0) { cout << \密码\ cin >> S_num; if(p1->Get_NO()==S_num) {
cout << \你的信息为:\ cout << endl; p1->Show(); cout << \注销登录\ int n; cin >> n; if(n==0) { exit ( -1 ); } } else { cout << endl; cout << \帐号密码不正确,请核实后重试!!!\ } } p1=p1->next; } }
void Boss::Modify_Information()//修改指定员工的信息 { Person *p1=head->next,*p2=head,*p3=NULL; char na[10]; char le[20]; int dm; double y; double x; int no; int num; int F; cout << \请你输你要修改员工的编号:\ cin >> num; int i=0; while(p1!=NULL) {
if(p1->Get_NO()==num) { int n; cout << \该员工信息为:\ p1->Show(); cout << endl << endl;
<< endl; cout << \ 请输入新的员工级别:\ cout << endl; cout << \ cout << \经理 ||2-技术人员 ||3-业务人员 ||4-业务经理 ||5-文秘 ||\<< endl; cout << \ cin >> n; switch(n) { case 1:strcpy(le,\经理\ cout << \请输入经理的名字:\ cin >> na; cout << \请输入编号:\ cin >> no; F=1; p3=new Manager(na,le,no,F);break; case 2:strcpy(le,\技术人员\ cout << \请输入技术人员的名字:\ cin >> na; cout << \请输入代码量(千行):\ cin >> dm ; cout << \请输入编号:\ cin >> no; F=2; p3=new Technical (na,le,dm,no,F);break; case 3:strcpy(le,\业务人员\ cout << \请输入业务人员的名字:\ cin >> na; cout << \请输入业务的当月销售额:\ cin >> y; cout << \请输入项目额:\ cin >> x; cout << \请输入编号:\ cin >> no; F=3; p3=new Business(na,le,y,x,no,F);break; case 4:strcpy(le,\业务经理\ cout << \业务经理的名字:\ cin >> na; cout << \请输入业务经理的当月销售额:\ cin >> y; cout << \请输入项目额:\
cin >> x; cout << \请输入编号:\ cin >> no; F=4; p3=new Business_Manager(na,le,y,x,no,F);break; case 5:strcpy(le,\文秘\ cout << \文秘的名字:\ cin >> na; cout << \请输入编号:\ cin >> no; F=5; p3=new Secretary(na,le,no,F);break; default:cout << \你的输入有误,请选择(1~5)进行输入!!\ }
p3->next=p1->next; p2->next=p3; delete p1; i=1; }
p1=p1->next; p2=p2->next; }
if(i==0) {
cout << endl;
cout << \无此员工信息,请你核实后重试&&&&&&&&&&\ cout << endl; } }
void Boss::Sort()//排序 {
Person *p,*q,*min,*min1,*h,*newhead; newhead=new Person; h=newhead;
while(head->next!=NULL) {
min1=p=head;
min=q=head->next; while(q!=NULL) {
if(q->Wage() > min->Wage()) {
min1=p;
共分享92篇相关文档