// main page design

#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include"popup.cpp"
#include"box1.cpp"
main()
{
clrscr();
char *a[]={" CUSTOMER REGISTER
" TRANSACTION REGISTER ",
" PASS-BOOK REGISTER
" EXIT

",

'\0' };
int r;
do{
textbackground(BLACK);
textcolor(WHITE);
clrscr();
name1();
box(25,9,56,25);
textattr(95|128);
gotoxy(33,10);
cprintf(" MAIN MENU ");
r=popup(a,11,28,3 ,112);
switch(r)
{
case 0:
system("CUSTMENU.exe");
break;
case 1:

",

",

system("TRANSMEN.exe");
break;
case 2:
system("PASSBOOK.exe");
break;
case 3:
break;
}
}while(r>=0 && r<=2);
}

//Add The Record
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
#include"box1.cpp"
class customer
{
private:
int accountno;
char name[15];
char address[15];
int openbalance;
char adate[12];
long int phone;
char accounttype;
int bankbalance;
public:
int getdata(void);
};
int customer::getdata(void)
{
textcolor(15);
textbackground(0);
clrscr();
name1();
box(15,8,63,17);
gotoxy(16,9);
cout<<"Enter the account no............";
cin>>accountno;
gotoxy(16,10);
cout<<"Enter the customer name.........";
gets(name);

gotoxy(16,11);
cout<<"Enter the address...............";
cin>>address;
gotoxy(16,12);
cout<<"Enter the open balance..........";
cin>>openbalance;
if(openbalance<=500)
{
gotoxy(16,16);
textattr(90|128);
cprintf(":Fail to Open Account:");
getch();
return(0);
}
else
{
gotoxy(16,13);
cout<<"Enter the date..................";
cin>>adate;
gotoxy(16,14);
cout<<"Enter the phone number..........";
cin>>phone;
gotoxy(16,15);
cout<<"Enter the account type..........";
cin>>accounttype;
gotoxy(16,16);
cout<<"Enter the bank balance..........";
cin>>bankbalance;
}
return(1);
}

void main()
{
textcolor(15);
textbackground(0);
clrscr();
fstream f;
customer A;
char ch;
int m;
//name();
//box(15,8,63,17);
f.open("cust.dat",ios::out|ios::binary|ios::app);
do
{
textcolor(WHITE);
f.clear();
m=A.getdata();
if (m==0)
break;
f.write((char*)&A,sizeof(A));
box(15,18,40,20);
gotoxy(16,19);
textattr(90|128);
cprintf("Do you want to continue");
box(42,18,44,20);
gotoxy(43,19);
cin>>ch;
}
while(ch=='y');
f.close();
}

/* box */
void box(int x,int y,int x1,int y1)
{
int i,j;
for (i=x;i<=x1;i++)
{
gotoxy(i,y);printf("%c",196);
gotoxy(i,y1);printf("%c",196);
}
for(j=y;j<=y1;j++)
{
gotoxy(x,j);printf("%c",179);
gotoxy(x1,j);printf("%c",179);
}
gotoxy(x,y),printf("%c",218);
gotoxy(x,y1),printf("%c",192);
gotoxy(x1,y),printf("%c",191);
gotoxy(x1,y1),printf("%c",217);
}

/* box */
void box(int x,int y,int x1,int y1)
{
int i,j;
for (i=x;i<=x1;i++)
{
gotoxy(i,y);printf("%c",196);
gotoxy(i,y1);printf("%c",196);
}
for(j=y;j<=y1;j++)
{
gotoxy(x,j);printf("%c",179);
gotoxy(x1,j);printf("%c",179);
}
gotoxy(x,y),printf("%c",218);
gotoxy(x,y1),printf("%c",192);
gotoxy(x1,y),printf("%c",191);
gotoxy(x1,y1),printf("%c",217);
}

/* box */
void box(int x,int y,int x1,int y1)
{
int i,j;
for (i=x;i<=x1;i++)
{
gotoxy(i,y);cout<<char(196);
gotoxy(i,y1);cout<<char(196);
}
for(j=y;j<=y1;j++)
{
gotoxy(x,j);cout<<char(179);
gotoxy(x1,j);cout<<char(179);
}
gotoxy(x,y),cout<<char(218);
gotoxy(x,y1),cout<<char(192);
gotoxy(x1,y),cout<<char(191);
gotoxy(x1,y1),cout<<char(217);
}
void name1(void)
{
gotoxy(29,4);
textcolor(GREEN);
cprintf("STATE BANK OF INDIA");
gotoxy(26,5);
cprintf("BRANCH : JIWAJI UNIVERSITY");
gotoxy(31,6);
cprintf("GWALIOR (M.P.)");
gotoxy(16,7);
cprintf("==============================================");
textcolor(WHITE);
}

/ costomer menu /
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include"popup.cpp"
#include"box1.cpp"
main()
{
clrscr();
char *a[]={" ADDITION ",
" DISPLAY ",
" SEARCHING ",
" MODIFY

",

" DELETION ",
" EXIT

",

'\0' };
int r;
do{
textbackground(BLACK);
textcolor(WHITE);
clrscr();
name1();
box(25,9,56,25);
textattr(112|128);
gotoxy(32,10);
cprintf(" CUSTOMER MENU ");
r=popup(a,11,35,2 ,112);
switch(r)
{
case 0:
system("ADD_CUST.exe");
break;
case 1:

system("DIS_CUST.exe");
break;
case 2:
system("SEARCH_C.exe");
break;
case 3:
system("MODI_CUS.exe");
break;
case 4:
system("DEL_CUST.exe");
break;
case 5:
break;
}
}while(r>=0 && r<=4);
}

// To Deletion In The Record //
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
#include"box1.cpp"
int flag=0;
class customer
{
int accountno;
char name[15];
char address[15];
int openbalance;
char adate[12];
long int phone;
char accounttype;
int bankbalance;
public:
void putdata(void);
int delete1(int n);
};
void customer::putdata(void)
{
gotoxy(18,13);
cout<<"1.Accountno is..................."<<accountno;
gotoxy(18,14);
cout<<"2.Date is........................"<<adate;
gotoxy(18,15);
cout<<"3.Customer name is..............."<<name;
gotoxy(18,16);
cout<<"4.Address is....................."<<address;
gotoxy(18,17);
cout<<"5.Openbalance is................."<<openbalance;

gotoxy(18,18);
cout<<"6.Bankbalance is................."<<bankbalance;
}
int customer::delete1(int n)
{
if(n==accountno)
{
flag=1;
putdata();
textcolor(15);
textbackground(0);
textattr(95|128);
gotoxy(25,22);
cprintf("RECORD HAS BEEN DELETED");
return(1);
}
return(0);
}
main()
{
clrscr();
customer A;
fstream f1,f2;
int c;
name1();
box(15,11,65,20);
f1.open("cust.dat",ios::in|ios::binary);
f2.open("temp.dat",ios::out|ios::binary);
box(15,8,63,10);
gotoxy(16,9);
cout<<"Enter account no you want to delete------->";
cin>>c;
while(!f1.eof())
{

f1.read((char*)&A,sizeof(A));
if(f1.eof())
break;
int k= A.delete1(c);
if(k==0)
{
f2.write((char*)&A,sizeof(A));
}
}
if (flag==0)
{textcolor(15);
textbackground(0);
clrscr();
textattr(95|128);
gotoxy(25,12);
cprintf("RECORD NOT FOUND");
}
else
{
f1.close();
f2.close();
remove("cust.dat");
rename("temp.dat","cust.dat");
}
getch();
}

//To Delete The Record
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
class transaction
{
int accountno;
char date[10];
char status[10];
char particular;
public:
void putdata(void);
int delete1(int n);
};
void transaction::putdata(void)
{
cout<<"account no....."<<accountno<<"\n";
cout<<"date of transaction......."<<date<<"\n";
cout<<"amount status......"<<status<<"\n";
cout<<"amount particular via chaque/cash....."<<particular<<"\n";
}
int transaction::delete1(int n)
{
if(n==accountno)
{
putdata();
cout<<"record has been deleted........";
return(1);
}
return(0);

}
main()
{
clrscr();
transaction A;
fstream f1,f2;
char c;
f1.open("trans.dat",ios::in);
f2.open("temp.dat",ios::out);
cout<<"Enter accountno you want to delete.....";
cin>>c;
while(!f1.eof())
{
f1.read((char*)&A,sizeof(A));
if(f1.eof())
break;
int k=A.delete1(c);
if(k==0)
{
f2.write((char*)&A,sizeof(A));
}
}
f1.close();
f2.close();
remove("trans.dat");
remove("temp.dat","trans.dat");
getch();
}

//To Display The Record
#include<iostream.h>
#include<fstream.h>
#include<conio.h>
#include"box1.cpp"
class customer
{
private:
int accountno;
char name[15];
char address[15];
int openbalance;
char adate[12];
long int phone;
char accounttype;
int bankbalance;
public:
void putdata(void);
};
void customer:: putdata(void)
{
clrscr();
name1();
box(15,8,68,17);
gotoxy(16,9);
cout<<"Accountno-------------------------"<<accountno;
gotoxy(16,10);
cout<<"Date------------------------------"<<adate;
gotoxy(16,11);
cout<<"Name------------------------------"<<name;
gotoxy(16,12);
cout<<"Address---------------------------"<<address;
gotoxy(16,13);

cout<<"Phone-----------------------------"<<phone;
gotoxy(16,14);
cout<<"Openbalance-----------------------"<<openbalance;
gotoxy(16,15);
cout<<"Bankbalance-----------------------"<<bankbalance;
gotoxy(16,16);
cout<<"Accounttype-----------------------"<<accounttype;
getch();
};
void main()
{
clrscr();
fstream f;
customer A;
clrscr();
f.open("cust.dat",ios::in|ios::binary);
while(!f.eof())
{
f.read((char*)&A,sizeof(A));
if(f.eof())
break;
A.putdata();
}
textcolor(15);
textbackground(0);
textattr(95|128);
gotoxy(30,20);
cprintf("Press Any Key");
f.close();
getch();
}

//Display The Record
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
#include"box1.cpp"
class transaction
{
int accountno;
char date[10];
char status;
int amount;
char particular[20];
public:
void putdata(void);
};
void transaction::putdata(void)
{
box(18,9,60,15);
gotoxy(24,10);
cout<<"Accountno is--------"<<accountno;
gotoxy(24,11);
cout<<"Date is-------------"<<date;
gotoxy(24,12);
cout<<"Status is-----------"<<status;
gotoxy(24,13);
cout<<"Amount is-----------"<<amount;
gotoxy(24,14);
cout<<"Cheque/cash---------"<<particular;
getch();
}
main()
{

clrscr();
fstream f;
char ch;
transaction A;
name1();
f.open("trans.dat",ios::in|ios::binary);
while(!f.eof())
{
f.read((char*)&A,sizeof(A));
if(f.eof())
break;
A.putdata();
}
textcolor(15);
textbackground(0);
textattr(95|128);
gotoxy(30,20);
cprintf("Press Any Key");
f.close();
getch();
}

//Add The Record
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
#include"box1.cpp"
class customer
{
private:
int accountno;
char name[15];
char address[15];
int openbalance;
char adate[12];
long int phone;
char accounttype;
int bankbalance;
public:
int getdata(void);
};
int customer::getdata(void)
{
textcolor(15);
textbackground(0);
clrscr();
name1();
box(15,8,63,17);
gotoxy(16,9);
cout<<"Enter the account no............";
cin>>accountno;
gotoxy(16,10);
cout<<"Enter the customer name.........";
gets(name);

gotoxy(16,11);
cout<<"Enter the address...............";
cin>>address;
gotoxy(16,12);
cout<<"Enter the open balance..........";
cin>>openbalance;
if(openbalance<=500)
{
gotoxy(16,16);
textattr(90|128);
cprintf(":Fail to Open Account:");
getch();
return(0);
}
else
{
gotoxy(16,13);
cout<<"Enter the date..................";
cin>>adate;
gotoxy(16,14);
cout<<"Enter the phone number..........";
cin>>phone;
gotoxy(16,15);
cout<<"Enter the account type..........";
cin>>accounttype;
gotoxy(16,16);
cout<<"Enter the bank balance..........";
cin>>bankbalance;
}
return(1);
}
void main()
{
textcolor(15);

textbackground(0);
clrscr();
fstream f;
customer A;
char ch;
int m;
//name();
//box(15,8,63,17);
f.open("cust.dat",ios::out|ios::binary|ios::app);
do
{
textcolor(WHITE);
f.clear();
m=A.getdata();
if (m==0)
break;
f.write((char*)&A,sizeof(A));
box(15,18,40,20);
gotoxy(16,19);
textattr(90|128);
cprintf("Do you want to continue");
box(42,18,44,20);
gotoxy(43,19);
cin>>ch;
}
while(ch=='y');
f.close();
}

//To Delete The Record
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
class transaction
{
int accountno;
char date[10];
char status[10];
char particular;
public:
void putdata(void);
int delete1(int n);
};
void transaction::putdata(void)
{
cout<<"account no....."<<accountno<<"\n";
cout<<"date of transaction......."<<date<<"\n";
cout<<"amount status......"<<status<<"\n";
cout<<"amount particular via chaque/cash....."<<particular<<"\n";
}
int transaction::delete1(int n)
{
if(n==accountno)
{
putdata();
cout<<"record has been deleted........";
return(1);
}
return(0);
}

main()
{
clrscr();
transaction A;
fstream f1,f2;
char c;
f1.open("trans.dat",ios::in);
f2.open("temp.dat",ios::out);
cout<<"Enter accountno you want to delete.....";
cin>>c;
while(!f1.eof())
{
f1.read((char*)&A,sizeof(A));
if(f1.eof())
break;
int k=A.delete1(c);
if(k==0)
{
f2.write((char*)&A,sizeof(A));
}
}
f1.close();
f2.close();
remove("trans.dat")
remove("temp.dat","trans.dat)
getch();
}

//Entry In Pass Book
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
class transaction
{
int accountno;
char date[10];
char status;
int amount;
char particular[20];
public:
void putdata(int c)
{
if (accountno==c)
{
if(status=='w')
{
cout<<date<<"\t"<<particular<<"\t"<<amount<<"\t\t\t"<<endl;
}
else
{
cout<<date<<"\t"<<particular<<"\t\t\t"<<amount<<endl;
}
}
}
};
main()
{
clrscr();
transaction A;
fstream f;

char c;
f.open("trans.dat",ios::in);
cout<<"Enter the accountno";
cin>>c;
cout<<"\n";
cout<<"--------------------------------------------------------------------------------";
cout<<"\t\t\t\t"<<"\t"<<"\t\t\t"<<"\t"<<"\t\t\t"<<"\t"<<"Amount"<<"\t\t"<<"Amoun
t"<<"\t\t\t"<<endl;
cout<<"date"<<"\t"<<"particular"<<"\t"<<"withdrawn"<<"\t"<<"deposite"<<"\t"<
<"balance"<<endl;
cout<<"--------------------------------------------------------------------------------";
cout<<"\n";
while(!f.eof())
{
f.read((char*)&A,sizeof(A));
if (f.eof())
break;
A.putdata(c);
}
getch();
}

// To Modification In The Record
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
#include"box1.cpp"
class customer
{
int accountno;
char name[15];
char address[15];
int openbalance;
char adate[12];
long int phone;
char accounttype;
int bankbalance;
public:
int modify(int n);
};
int customer::modify(int n)
{
if(n==accountno)
{
int x;
box(13,8,65,17);
box(15,21,63,23);
gotoxy(15,9);
cout<<"1.Account Number Is.............."<<accountno;
gotoxy(15,10);
cout<<"2.Date Is........................"<<adate;
gotoxy(15,11);
cout<<"3.Customer Name Is..............."<<name;
gotoxy(15,12);

cout<<"4.Address Is....................."<<address;
gotoxy(15,13);
cout<<"5.Phone Number Is................"<<phone;
gotoxy(15,14);
cout<<"6.Open Balance Is................"<<openbalance;
gotoxy(15,15);
cout<<"7.Bank Balance Is................"<<bankbalance;
gotoxy(15,16);
cout<<"8.Account Type Is................"<<accounttype;
box(15,18,55,20);
textattr(110|128);
gotoxy(16,19);
cprintf("Which field you want to modify-------->");
box(56,18,63,20);
gotoxy(59,19);
cin>>x;
switch(x)
{
case 1:
gotoxy(16,22);
cout<<"ACCOUNT NUMBER IS------------->";
cin>>accountno;
break;
case 2:
gotoxy(16,22);
cout<<"DATE IS----------------------->";
cin>>adate;
break;
case 3:
gotoxy(16,22);
cout<<"CUSTOMER NAME IS-------------->";
gets(name);
break;
case 4:

gotoxy(16,22);
cout<<"ADDRESS IS-------------------->";
gets(address);
break;
case 5:
gotoxy(16,22);
cout<<"PHONE NUMBER IS--------------->";
cin>>phone;
break;
case 6:
gotoxy(16,22);
cout<<"OPEN BALANCE IS-------------->";
cin>>openbalance;
break;
case 7:
gotoxy(16,22);
cout<<"BANK BALANCE IS------------->";
cin>>bankbalance;
break;
case 8:
gotoxy(16,22);
cout<<"ACCOUNT TYPE IS------------->";
cin>>accounttype;
break;
default:
textcolor(15);
textbackground(0);
clrscr();
textattr(95|128);
gotoxy(30,12);
cprintf("WRONG OPTION");
getch();
}
return(1);

}
return(0);
}
void main()
{
clrscr();
customer A;
fstream f1,f2;
int c,k,n,found,found1=0;
f1.open("cust.dat",ios::in|ios::binary);
f2.open("temp.dat",ios::out|ios::binary);
name1();
box(5,1,55,3);
textattr(110|128);
gotoxy(6,2);
cprintf("Enter Account Number You Want To Modify:------->");
box(56,1,64,3);
gotoxy(57,2);
cin>>c;
while(!f1.eof())
{
f1.read((char*)&A,sizeof(A));
if(f1.eof())
break;
found=A.modify(c);
if (found==1)
found1=1;
f2.write((char*)&A,sizeof(A));
}
if(found1==0)
{
textcolor(15);
textbackground(0);
clrscr();

gotoxy(25,12);
textattr(90|128);
cprintf("RECORD IS NOT PRESENT") ;
}
textcolor(15);
textbackground(0);
textattr(95|128);
gotoxy(28,24);
cprintf("Press Any Key To Exit");
f1.close();
f2.close();
remove("cust.dat");
rename("temp.dat","cust.dat");
getch();
}

//To Modification The Record
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
class transaction
{
int accountno;
char date[10];
char status;
int amount;
char particular[20];
public:
void modify(int n);
};
void transaction::modify(int n)
{
if(n==accountno)
{
int x;
cout<<"1.Account no....."<<accountno<<endl;
cout<<"2.Date of transaction......."<<date<<endl;
cout<<"3.Amount status......"<<status<<endl;
cout<<"4.Amount particular via chaque/cash....."<<particular<<endl;
cout<<"Which field you want to modify..........";
cin>>x;
switch(x)
{
case 1:
cout<<"accountno is........";
cin>>accountno;
break;
case 2:

cout<<"Date of transaction is........";
cin>>date;
break;
case 3:
cout<<"amount status is.......";
cin>>status;
break;
case 4:
cout<<"amount via is...";
cin>>particular;
break;
default:
cout<<"wrong option";
}
}
}
main()
{
clrscr();
transaction A;
fstream f1,f2;
int c;
f1.open("trans.dat",ios::in);
f2.open("temp.dat",ios::out);
cout<<"Enter account no you want to modify........,";
cin>>c;
while(!f1.eof())
{
f1.read((char*)&A,sizeof(A));
if(f1.eof())
break;
A.modify(c);
f2.write((char*)&A,sizeof(A));
}

f1.close();
f2.close();
//remove("trans.dat");
//rename("temp.dat","cust.dat");
getch();
}

//Entry In Pass Book
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
#include"box1.cpp"
int bal=0;
class customer
{
public:
int accountno;
char name[15];
char address[15];
int openbalance;
char adate[12];
long int phone;
char accounttype;
int bankbalance;
public:
void putdata(void);
int search(int x)
{
if(x==accountno)
{
putdata();
return(1);
}
return(0);
}
};
void customer:: putdata(void)
{
gotoxy(7,9);

cout<<"Date:"<<adate;
gotoxy(7,8);
cout<<"Name:"<<name;
gotoxy(50,9);
cout<<"Accounttype:"<<accounttype;
gotoxy(30,8);
cout<<"Openbalance:"<<openbalance;
gotoxy(30,9);
cout<<"Bankbalance:"<<bankbalance;
}
class transaction
{
int accountno;
char date[10];
char status;
int amount;
char particular[20];
public:
void putdata(int c)
{
//cout<<"Status is...:"<<status<<" "<<accountno<<" "<<c;
//getch();
if (accountno==c)
{
if(status=='w')
{
bal=bal-amount;
//gotoxy(1,15);
cout<<date<<"\t"<<particular<<"\t\t"<<amount<<"\t\t\t\t\t"<<bal<<endl;
}
else
{
bal=bal+amount;

//gotoxy(1,15);
cout<<date<<"\t"<<particular<<"\t\t\t"<<"\t"<<amount<<"\t\t\t"<<bal<<endl;
}
}
}
};
main()
{
clrscr();
transaction A;
customer C;
fstream f,f1;
int c,k;
f.open("trans.dat",ios::in|ios::binary);
f1.open("cust.dat",ios::in|ios::binary);
box(25,10,50,12);
gotoxy(26,11);
cout<<"Enter the accountno---->";
box(52,10,60,12);
gotoxy(53,11);
cin>>c;
clrscr();
name1();
while(!f1.eof())
{
f1.read((char*)&C,sizeof(C));
if(f1.eof())
break;
k=C.search(c);
if(k==1)
break;
}
if(k==0)
{

textcolor(15);
textbackground(0);
clrscr();
textattr(95|128);
gotoxy(30,12);
cprintf("NOT FOUND");
}
else
{
gotoxy(1,9);
cout<<"\n--------------------------------------------------------------------------------";
cout<<"\t\t\t\t"<<"\t"<<"\t\t\t"<<"\t"<<"\t\t\t"<<"\t"<<"Amount"<<"\t\t"<<"Amoun
t"<<"\t\t\t"<<endl;
//gotoxy(1,12);
cout<<"date"<<"\t"<<"particular"<<"\t"<<"withdrawn"<<"\t"<<"deposite"<<"\t\t"
<<"balance"<<endl;
cout<<"--------------------------------------------------------------------------------";
cout<<"\n";
//gotoxy(30,11);
//cout<<"Amount";
//gotoxy(50,11);
//cout<<"amount";
bal=bal+C.openbalance;
cout<<C.adate<<"\t"<<"Opening
Balance"<<"\t\t\t"<<C.openbalance<<"\t\t\t"<<bal<<endl;
while(!f.eof())
{
f.read((char*)&A,sizeof(A));
if (f.eof())
break;
A.putdata(c);
}
}
getch();}

// passbook
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include"popup.cpp"
#include"box1.cpp"
main()
{
clrscr();
char *a[]={" SHOW PASS-BOOK ",
" EXIT

",

'\0' };
int r;
do{
textbackground(BLACK);
textcolor(WHITE);
clrscr();
name1();
box(25,10,56,20);
textattr(95|128);
gotoxy(31,12);
cprintf(" PASS-BOOK MENU ");
r=popup(a,14,32,2 ,112);
switch(r)
{
case 0:
system("PASS_BOO.exe");
break;
case 1:
break;
}
}while(r>=0 && r<=0);
}

// popup program
#include<stdio.h>
#include<iostream.h>
#include<stdlib.h>
#include<bios.h>
#include<conio.h>
int popup(char *popup[],int ROW,int COLUMN,int space,int COLOR_ATTRIB)
{
int i,choice,p,count=0;
p=space;
_setcursortype(_NOCURSOR);
textattr(COLOR_ATTRIB);
for(i=0;popup[i]!='\0';i++)
{
gotoxy(COLUMN,ROW+p);
cprintf("%s",popup[i]);
p=p+space;
count=count+1;
}
textattr(COLOR_ATTRIB-1);
gotoxy(COLUMN,ROW+space);
cprintf("%s",popup[0]);
p=space;
i=0;
while(1)
{
choice=bioskey(0);
if (choice==20480 && i<count-1 && popup[i]!='\0')
{
textattr(COLOR_ATTRIB);
gotoxy(COLUMN,ROW+p);
cprintf("%s",popup[i]);
p=p+space;

i=i+1;
textattr(COLOR_ATTRIB-1);
gotoxy(COLUMN,ROW+p);
cprintf("%s",popup[i]);
}
else
if (choice==18432 && i>0)
{
textattr(COLOR_ATTRIB);
gotoxy(COLUMN,ROW+p);
cprintf("%s",popup[i]);
p=p-space;
i=i-1;
textattr(COLOR_ATTRIB-1);
gotoxy(COLUMN,ROW+p);
cprintf("%s",popup[i]);
}
else
if(choice==7181)
{
_setcursortype(_NORMALCURSOR);
return(i);
}
}
}

//To Search The Record
#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
#include"box1.cpp"
class customer
{
int accountno;
char name[15];
char address[15];
int openbalance;
char adate[12];
long int phone;
char accounttype;
int bankbalance;
public:
void putdata()
{
textcolor(15);
textbackground(0);
clrscr();
name1();
box(15,11,68,20);
gotoxy(16,12);
cout<<"Account Number-----------------------"<<accountno;
gotoxy(16,13);
cout<<"Date---------------------------------"<<adate;
gotoxy(16,14);
cout<<"Name----------------------------------"<<name;
gotoxy(16,15);
cout<<"Address-------------------------------"<<address;
gotoxy(16,16);

cout<<"Phone---------------------------------"<<phone;
gotoxy(16,17);
cout<<"Open Balance--------------------------"<<openbalance;
gotoxy(16,18);
cout<<"Bank Balance--------------------------"<<bankbalance;
gotoxy(16,19);
cout<<"Account Type--------------------------"<<accounttype;
}
int search(int x)
{
if(x==accountno)
{
putdata();
return(1);
}
return(0);
}
};
main()
{
clrscr();
int n,k;
customer A;
fstream f;
char ch;
do
{
f.open("cust.dat",ios::in);
textcolor(15);
textbackground(0);
clrscr();
name1();
box(15,12,53,14);
textattr(90|128);

gotoxy(16,13);
cprintf("Enter The Account Number:---------->");
box(54,12,60,14);
gotoxy(55,13);
cin>>n;
while(!f.eof())
{
f.read((char*)&A,sizeof(A));
if(f.eof())
break;
k=A.search(n);
if(k==1)
break;
}
if(k==0)
{
textcolor(15);
textbackground(0);
clrscr();
textattr(95|128);
gotoxy(30,12);
cprintf("NOT FOUND");
}
box(15,21,40,23);
gotoxy(16,22);
textattr(95|128);
cprintf("Do you want to continue");
box(42,21,45,23);
gotoxy(43,22);
cin>>ch;
f.close();
}
while(ch=='y');
textcolor(15);

textbackground(0);
textattr(90|128);
gotoxy(30,24);
cprintf("Press Any Key To Exit");
f.close();
getch();
}

// transaction menu
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include"popup.cpp"
#include"box1.cpp"
main()
{
clrscr();
char *a[]={" ADDITION ",
" DISPLAY ",
" EXIT

",

'\0' };
int r;
do{
textbackground(BLACK);
textcolor(WHITE);
clrscr();
name1();
box(25,9,56,21);
textattr(95|128);
gotoxy(30,11);
cprintf(" TRANSACTION MENU ");
r=popup(a,12,35,2,112);
switch(r)
{
case 0:
system("ADD_TRAN.exe");
break;
case 1:
system("DIS_TRA.exe");
break;
case 2:

break;
}
}while(r>=0 && r<=1);
}

Sign up to vote on this title
UsefulNot useful