📄 main.cpp
字号:
id.setpoints(220,120); outtextxy(120,125,"EMP-ID");
pass.setpoints(220,160); outtextxy(120,165,"PASSWORD");
repass.setpoints(220,200); outtextxy(120,205,"RE-ENTER");
id.show();
pass.show();
repass.show();
//submit.show(RED);setcolor(WHITE);outtextxy(235,267,"SUBMIT");
mouse.showmouseptr();
while(1)
{
id.check();
pass.check();
repass.check();
if(submit.check()==TRUE)
{user a;
int r=a.search(id.readstring());
setfillstyle(SOLID_FILL,RED);/****************************COLOR COLOR*/
int twidth,theight;
twidth=textwidth("SORRY EMP-ID ALREADY TAKEN");
theight=textheight("SORRY EMP-ID ALREADY TAKEN");
bar(220,90,220+twidth,90+theight);
if(r!=-1)
{
outtextxy(220,90,"SORRY EMP-ID ALREADY TAKEN");continue;
}
if(strcmp(pass.readstring(),repass.readstring())!=0){outtextxy(220,90,"PLEASE CHECK THE PASSWORD ");continue;}
if(r==-1)
{
a.gid(id.readstring(),pass.readstring());
int z=current.search_delete();
if(z!=-1)
{
a.RRN=z;
a.overwrite(z,&a);
}
else
{
a.writetodisk(&a);
}
mouse.hidemouseptr();
cleardevice();
setbk();
setcolor(YELLOW);
outtextxy(200,200,"EMPLOYEE CREATED");
outtextxy(200,240,"PLEASE LOGON TO ACCESS ALL THE INFORMATION");
outtextxy(200,280,"PRESS ANY KEY TO CONTINUE");
getch();
mouse.showmouseptr();
administratormain();
return;
}
}
}
//getch();
}
void modifyloan()
{
mouse.hidemouseptr();
setbk();
//putimage(20,20,logo,0);
/*setfillstyle(SOLID_FILL,2);
bar(30,100,615,380);
setcolor(0);
rectangle(30,100,615,380);
rectangle(35,125,295,360);
rectangle(310,360,610,125);
setcolor(15);
line(295,360,295,125);
line(295,360,35,360);
line(610,125,610,360);
line(610,360,310,360);
line(30,100,615,100);
line(30,100,30,380);*/
button down(30,350,615,355);
down.show(0);
//putimage(0,getmaxy()-20,jr2,0);
textbox type,amount,interest,date,monthly,paid,nof,bal;
setcolor(11);
type.setpoints(160,150);outtextxy(50,162,"TYPE OF LOAN");
date.setpoints(160,200);outtextxy(50,212,"DATE");
amount.setpoints(160,250);outtextxy(50,262,"AMOUNT");
interest.setpoints(160,300);outtextxy(50,312,"INTEREST");
monthly.setpoints(470,150);outtextxy(322,162,"MONTHLY PAYABLE");
paid.setpoints(470,200);outtextxy(322,212,"PAYABLE AMNT.");
nof.setpoints(470,250);outtextxy(322,262,"NO. OF INST.");
bal.setpoints(470,300);outtextxy(322,312,"BALANCE");
type.setstring(current.typel);
amount.setnumber(current.amountl);
interest.setnumber(current.interest);
date.setstring(current.whenl);
monthly.setnumber(current.months);
paid.setnumber(current.amounttobepaid);
nof.setnumber(current.noofinstall);
bal.setnumber(current.balance);
type.show(administer);
date.show(administer);
amount.show(administer);
interest.show(administer);
monthly.show(administer);
paid.show(administer);
nof.show(administer);
bal.show(administer);
//button back(578,432,614,464);
//back.show(4);
button back(594,443,15,15);
back.tbutton(2);
back.show();
o.open("back.dat",ios::in|ios::out|ios::nocreate|ios::noreplace|ios::binary);
if(!o.good()){cleardevice();outtextxy(200,200,"ERROR IN BACK.DAT");getch();}
o.read(picture,10000);
o.close();
putimage(580,427,picture,0);
//putimage(580,427,picture,0);
//interest.show();
//button submit(280,405,370,440);
//submit.show(4);setcolor(15);outtextxy(317,418,"SUBMIT");
//button submit(260,350,370,383);
button submit(260,410,370,443);
submit.show(4);
setcolor(15);
outtextxy(320,422,"SUBMIT");
o.open("submit.dat",ios::in|ios::out|ios::binary|ios::noreplace|ios::nocreate);
o.read(picture,10000);
o.close();
putimage(263,412,picture,0);
while(1)
{
mouse.showmouseptr();
mouse.getmousepos();
if(administer==WHITE)
{
type.check(4,15);
date.check(4,15);
amount.check(4,15);
interest.check(4,15);
monthly.check(4,15);
paid.check(4,15);
nof.check(4,15);
bal.check(4,15);
if(submit.check()==TRUE)
{
current.gloandetails(type.readstring(),date.readstring(),amount.readnumber(),interest.readnumber(),
monthly.readnumber(),paid.readnumber(),nof.readnumber(),bal.readnumber());
current.sloandetails();
return;
}
}
if(back.check()==TRUE)
{current.sloandetails();return;}
}
//getch();
}
void modifyleave()
{
mouse.hidemouseptr();
setbk();
/*button a(30,150,610,330);
a.show(2);
setcolor(0);
rectangle(45,175,300,300);
rectangle(310,300,590,175);
setcolor(15);
line(300,300,45,300);
line(300,300,300,175);
line(590,300,310,300);
line(590,300,590,175);*/
//putimage(20,20,logo,0);
//putimage(0,getmaxy()-20,jr2,0);
button down(50,330,610,335);
down.show(0);
textbox earn,casual,medical,taken;
setcolor(11);
earn.setpoints(170,200);outtextxy(60,210,"EARNED LEAVE");
medical.setpoints(170,250);outtextxy(60,260,"MEDICAL LEAVE");
casual.setpoints(430,200);outtextxy(320,210,"CASUAL LEAVE");
taken.setpoints(430,250);outtextxy(320,260,"LEAVES TAKEN");
earn.setnumber(current.EL);
medical.setnumber(current.ML);
casual.setnumber(current.CL);
taken.setnumber(current.LT);
earn.show(administer);
medical.show(administer);
casual.show(administer);
taken.show(administer);
//button back(578,432,614,464);
//back.show(4);
button back(594,443,15,15);
back.tbutton(2);
back.show();
o.open("back.dat",ios::in|ios::out|ios::nocreate|ios::noreplace|ios::binary);
if(!o.good()){cleardevice();outtextxy(200,200,"ERROR IN BACK.DAT");getch();}
o.read(picture,10000);
o.close();
putimage(580,427,picture,0);
//putimage(580,427,picture,0);
//button submit(260,370,350,410);
//submit.show(4);setcolor(15);outtextxy(300,387,"SUBMIT");
button submit(260,350,370,383);
submit.show(4);
setcolor(15);
outtextxy(320,362,"SUBMIT");
o.open("submit.dat",ios::in|ios::out|ios::binary|ios::noreplace|ios::nocreate);
o.read(picture,10000);
o.close();
putimage(263,352,picture,0);
while(1)
{
mouse.showmouseptr();
mouse.getmousepos();
if(administer==WHITE)
{
earn.check(4,15);
medical.check(4,15);
casual.check(4,15);
taken.check(4,15);
if(submit.check()==TRUE)
{
current.gleavedetails(earn.readnumber(),casual.readnumber(),medical.readnumber(),taken.readnumber());
current.sleavedetails();
return;
}
}
if(back.check()==TRUE)
{
current.sleavedetails();return;
}
}
}
void modifypersonal()
{
mouse.hidemouseptr();
setbk();
textbox fname,lname,age,add1,addc,adds,addp,dept,pos,phone,email,sex,ms;
//button submit(290,430,380,455);
//button submit(260,350,370,383);
button submit(260,410,370,443);
submit.show(4);
setcolor(15);
outtextxy(320,422,"SUBMIT");
o.open("submit.dat",ios::in|ios::out|ios::binary|ios::noreplace|ios::nocreate);
o.read(picture,10000);
o.close();
putimage(263,412,picture,0);
int k=15;
//button dialog(17,25,620,420);
//dialog.show(2);
/*setcolor(BLACK);
int x=49;
line(x,44,x+262,44);
line(49,44,49,398);
setcolor(DARKGRAY);
line(49,45,311,45);
line(50,44,50,398);
setcolor(WHITE);
line(49,398,311,398);
line(311,44,311,398);
setcolor(WHITE);
line(49,397,311,397);
line(310,44,310,398);
setcolor(BLACK);
line(345,44,345+262,44);
line(345,44,345,398);
setcolor(DARKGRAY);
line(345,45,345+262,45);
line(346,44,346,398);
setcolor(WHITE);
line(345,398,345+262,398);
line(345+262,44,345+262,398);
setcolor(WHITE);
line(345,397,345+262,397);
line(345+261,44,345+261,398);
*/
//putimage(10,10,logo,0);
//putimage(0,getmaxy(),jr2,0);
button down(60,400,620,405);
down.show(0);
setcolor(11);
fname.setpoints(175,55); outtextxy(75,65,"FIRST NAME");
lname.setpoints(175,115); outtextxy(75,125,"LAST NAME ");
add1.setpoints(175,175); outtextxy(75,185,"ADDRESS ");
addc.setpoints(175,235); outtextxy(75,245,"CITY");
adds.setpoints(175,295); outtextxy(75,305,"STATE");
addp.setpoints(175,355); outtextxy(75,365,"PIN");
age.setpoints(475,55); outtextxy(375,65,"AGE ");
dept.setpoints(475,105); outtextxy(375,115,"DEPARTMENT ");
pos.setpoints(475,155); outtextxy(375,165,"POSITION ");
phone.setpoints(475,205); outtextxy(375,215,"PHONE ");
email.setpoints(475,255); outtextxy(375,265,"EMAIL ");
sex.setpoints(475,305); outtextxy(375,315,"SEX ");
ms.setpoints(475,355); outtextxy(375,365,"M/S ");
//submit.show(4); setcolor(15); outtextxy(310,437,"SUBMIT");
fname.setstring(current.fname);
lname.setstring(current.lname);
age.setnumber(current.age);
add1.setstring(current.add1);
addc.setstring(current.addc);
adds.setstring(current.adds);
addp.setstring(current.addp);
dept.setstring(current.dept);
pos.setstring(current.pos);
phone.setstring(current.phone);
email.setstring(current.email);
sex.setstring(current.sex);
ms.setstring(current.ms);
fname.show(k);
lname.show(k);
age.show(k);
add1.show(k);
addc.show(k);
adds.show(k);
addp.show(k);
dept.show(k);
pos.show(k);
phone.show(k);
email.show(k);
sex.show(k);
ms.show(k);
//button back(578,432,614,464);
//back.show(4);
button back(594,443,15,15);
back.tbutton(2);
back.show();
o.open("back.dat",ios::in|ios::out|ios::nocreate|ios::noreplace|ios::binary);
if(!o.good()){cleardevice();outtextxy(200,200,"ERROR IN BACK.DAT");getch();}
o.read(picture,10000);
o.close();
putimage(580,427,picture,0);
//putimage(580,427,picture,0);
while(1)
{
mouse.showmouseptr();
mouse.getmousepos();
fname.check(4,15);
lname.check(4,15);
add1.check(4,15);
addc.check(4,15);
adds.check(4,15);
addp.check(4,15);
age.check(4,15);
dept.check(4,15);
pos.check(4,15);
phone.check(4,15);
email.check(4,15);
sex.check(4,15);
ms.check(4,15);
if(submit.check()==TRUE)
{
current.gpprofile(fname.readstring(),lname.readstring(),add1.readstring(),
addc.readstring(),adds.readstring(),addp.readstring(),age.readnumber(),
dept.readstring(),pos.readstring(),phone.readstring(),email.readstring(),
sex.readstring(),ms.readstring());
current.spprofile();
return;
}
if(back.check()==TRUE)
{current.spprofile();}
}
}
void modifyPF()
{
mouse.hidemouseptr();
setbk();
textbox eePF,erPF;
/*button b(50,150,610,300);
button a(60,175,300,280);
button c(310,175,600,280);*/
/*b.show(12);
c.push();
a.push();*/
button down(60,270,610,275);
down.show(0);
setcolor(11);
eePF.setpoints(170,200); outtextxy(73,210,"EMPLOYEE PF");
erPF.setpoints(430,200); outtextxy(323,210,"EMPLOYER PF");
//button back(578,432,614,464);
//back.show(4);
button back(594,443,15,15);
back.tbutton(2);
back.show();
o.open("back.dat",ios::in|ios::out|ios::nocreate|ios::noreplace|ios::binary);
if(!o.good()){cleardevice();outtextxy(200,200,"ERROR IN BACK.DAT");getch();}
o.read(picture,10000);
o.close();
putimage(580,427,picture,0);
//putimage(580,427,picture,0);
char d[13],e[13];
itoa(current.empPF,d,10);
itoa(current.emprPF,e,10);
eePF.setstring(d);
erPF.setstring(e);
eePF.show(administer);
erPF.show(administer);
button submit(260,350,370,383);
submit.show(4);
setcolor(15);
outtextxy(320,362,"SUBMIT");
o.open("submit.dat",ios::in|ios::out|ios::binary|ios::noreplace|ios::nocreate);
o.read(picture,10000);
o.close();
putimage(263,352,picture,0);
while(1)
{
mouse.showmouseptr();
mouse.getmousepos();
if(administer==WHITE)
{
eePF.check(4,15);
erPF.check(4,15);
if(submit.check()==TRUE)
{
current.NPF=eePF.readnumber()+erPF.readnumber();
current.gPF(current.basic,current.DA,eePF.readnumber(),erPF.readnumber(),current.NPF);
current.sPF(); return;
}
}
if(back.check()==TRUE)
{current.sPF(); return;}
}
}
void modifypayslip()
{
mouse.hidemouseptr();
setbk();
//putimage(20,20,logo,0);
/*textbox basic,da,hra,spl,conveyance,pf,taxd,otherd,gross,net;
basic.setpoints(165,120);
da.setpoints(165,170);
hra.setpoints(165,220);
spl.setpoints(165,270);
conveyance.setpoints(165,320);
pf.setpoints(460,120);
taxd.setpoints(460,170);
otherd.setpoints(460,220);
gross.setpoints(460,270);
net.setpoints(460,320);
basic.setnumber(current.basic);
da.setnumber(current.DA);
hra.setnumber(current.HRA);
spl.setnumber(current.splallow);
conveyance.setnumber(current.conveyance);
pf.setnumber(current.NPF);
taxd.setnumber(current.taxd);
otherd.setnumber(current.otherd);
gross.setnumber(current.grossearn);
net.setnumber(current.nets);
*/float d,h,s,p;
textbox basic,da,hra,spl,conveyance,pf,taxd,otherd/*,gross,net*/;
basic.setpoints(170,120);
da.setpoints(170,170);
hra.setpoints(170,220);
spl.setpoints(170,270);
conveyance.setpoints(460,120);
pf.setpoints(460,170);
taxd.setpoints(460,220);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -