// main page design #include
#include<stdio.h> #include #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 #include #include<stdio.h> #include #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<
/ costomer menu / #include #include<stdio.h> #include #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 #include #include<stdio.h> #include #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..................."<
gotoxy(18,18); cout<<"6.Bankbalance is................."<"; 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 #include #include<stdio.h> #include 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....."<
} 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 rel="nofollow">>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 #include #include #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-------------------------"<
cout<<"Phone-----------------------------"<
//Display The Record #include #include #include<stdio.h> #include #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--------"<
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 #include #include<stdio.h> #include #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 #include #include<stdio.h> #include 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....."<
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 rel="nofollow">>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 #include #include<stdio.h> #include 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<
char c; f.open("trans.dat",ios::in); cout<<"Enter the accountno"; cin rel="nofollow">>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 #include #include<stdio.h> #include #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.............."<
cout<<"4.Address Is....................."<"); 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 #include #include<stdio.h> #include 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....."<>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 #include #include<stdio.h> #include #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:"<
//gotoxy(1,15); cout<"; 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<
// passbook #include #include<stdio.h> #include #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 #include<stdlib.h> #include #include 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
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 #include #include<stdio.h> #include #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-----------------------"<
cout<<"Phone---------------------------------"<
gotoxy(16,13); cprintf("Enter The Account Number:---------- rel="nofollow">"); 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 #include<stdio.h> #include #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); }