Professional Documents
Culture Documents
Bank of Pakistan: Header Files Include in This Program
Bank of Pakistan: Header Files Include in This Program
gotoxy(a,b); printf("\xc9");
gotoxy(c,b); printf("\xbb");
gotoxy(a,d); printf("\xc8");
gotoxy(c,d); printf("\xbc");
do
{
ch=getch();
else
if(ch==8 && i>0)
{
printf("%c%c%c",8,32,8);
i--;
p--;
}
}while(ch!=13 || i<size-1);
*p='\0';
do
{
cj=toupper(getch());
else
}while(cj!=13);
x[j]='\0';
*p='\0';
char id[NUM];
char name[MAX];
double dep, with, bal;
int day, month, year;
int status;
* MENUES FUNCTIONS *
* HELP FUNCTIONS *
* MAIN FUNCTION *
void main()
{
splash();
FILE *f;
char ch;
b->bal = 0;
f = fopen("Bank.dat","ab");
if (f != NULL)
{
do
{
textcolor(GREEN);
clrscr();
_setcursortype(_SOLIDCURSOR);
box(12,3,69,5);
gotoxy(31,4);
textcolor(CYAN + BLINK);
cprintf("BANK OF PAKISTAN");
box(16,7,65,20);
textcolor(CYAN);
gotoxy(29,7);
cprintf(" ++ OPEN NEW ACCOUNT ++ ");
gotoxy(27,10);
cprintf("ACCOUNT NO : ");
check_id(b->id, NUM);
gotoxy(27,12);
cprintf("ENTER NAME : ");
check_name(b->name, MAX);
{
struct date d;
getdate(&d);
b->day = d.da_day;
b->month = d.da_mon;
b->year = d.da_year;
}
_setcursortype(_NOCURSOR);
textcolor(YELLOW);
gotoxy(19,19);cputs(b->id);
gotoxy(28,19);cputs(b->name);
gotoxy(48,19);cprintf("%d-%d-%d",b->day,b->month,b->year);
gotoxy(62,19);cprintf("%.00lf",b->bal);
fwrite(b, sizeof(struct bank), 1, f);
fclose(f);
textcolor(CYAN);
gotoxy(18,23);
cprintf("DO YOU WANT TO ENTER ANOTHER RECORD? [Y]/[N] : ");
ch = getche();
else
{
clrscr();
box(26,12,55,14);
_setcursortype(_NOCURSOR);
textcolor(YELLOW + BLINK);
gotoxy(28,13);
cputs("*** ERROR OPENING FILE ***");
getch();
}
menu();
int i;
char dp[NUM];
FILE *f, *fm;
textcolor(GREEN);
clrscr();
_setcursortype(_SOLIDCURSOR);
f = fopen("Bank.dat","rb");
fm = fopen("Temp.dat","wb");
if (f != NULL)
{
box(12,3,69,5);
gotoxy(31,4);
textcolor(CYAN + BLINK);
cputs("BANK OF PAKISTAN");
box(16,7,65,22);
textcolor(CYAN);
gotoxy(30,7);
cputs(" ++ DEPOSIT MONEY ++ ");
gotoxy(24,9);
cputs("ENTER ACCOUNT NO. TO DEPOSIT : ");
check_id(dp, NUM);
rewind(f);
if (strcmp(dp, b->id) == 0)
{
i++;
gotoxy(27,12);
cprintf("ACCOUNT NO : %s",b->id);
gotoxy(27,14);
cprintf("PERSON NAME : %s",b->name);
gotoxy(27,16);
cputs("DEPOSIT MONEY : ");
cin>>b->dep;
gotoxy(27,18);
cprintf("BALANCE NOW : %.00lf",b->bal);
_setcursortype(_NOCURSOR);
textcolor(YELLOW);
gotoxy(19,21);cputs(b->id);
gotoxy(26,21);cputs(b->name);
gotoxy(46,21);cprintf("%.00lf",b->dep);
gotoxy(59,21);cprintf("%.00lf",b->bal);
fflush(stdin);
getch();
}
fclose(f);
fclose(fm);
remove("Bank.dat");
rename("Temp.dat","Bank.dat");
}
else
{
clrscr();
box(26,12,55,14);
_setcursortype(_NOCURSOR);
textcolor(YELLOW + BLINK);
gotoxy(28,13);
cputs("*** ERROR OPENING FILE ***");
getch();
}
menu();
int i;
char wt[NUM];
FILE *f, *fm;
textcolor(GREEN);
clrscr();
_setcursortype(_SOLIDCURSOR);
f = fopen("Bank.dat","rb");
fm = fopen("Temp.dat","wb");
if (f != NULL)
{
box(12,3,69,5);
gotoxy(31,4);
textcolor(CYAN + BLINK);
cputs("BANK OF PAKISTAN");
box(16,7,65,22);
textcolor(CYAN);
gotoxy(31,7);
cputs(" ++ WITHDRAW MONEY ++ ");
gotoxy(24,9);
cputs("ENTER ACCOUNT NO. TO WITHDRAW : ");
check_id(wt, NUM);
rewind(f);
if (strcmp(wt, b->id)== 0)
{
gotoxy(27,12);
cprintf("ACCOUNT NO : %s",b->id);
gotoxy(27,14);
cprintf("PERSON NAME : %s",b->name);
gotoxy(27,16);
cputs("WITHDRAW MONEY : ");
cin>>b->with;
else
{
b->bal = b->bal - b->with;
gotoxy(27,18);
cprintf("BALANCE NOW : %.00lf",b->bal);
_setcursortype(_NOCURSOR);
textcolor(YELLOW);
gotoxy(19,21);cputs(b->id);
gotoxy(26,21);cputs(b->name);
gotoxy(46,21);cprintf("%.00lf",b->with);
gotoxy(59,21);cprintf("%.00lf",b->bal);
}
fflush(stdin);
getch();
}
fclose(f);
fclose(fm);
remove("Bank.dat");
rename("Temp.dat","Bank.dat");
}
else
{
clrscr();
box(26,12,55,14);
_setcursortype(_NOCURSOR);
textcolor(YELLOW + BLINK);
gotoxy(28,13);
cputs("*** ERROR OPENING FILE ***");
getch();
}
menu();
}
* VIEW RECORDS (One By One) *
FILE *f;
char ch;
f = fopen("Bank.dat","rb");
if(f != NULL)
{
clrscr();
while( fread(b, sizeof(struct bank), 1, f))
if(b->status == 0)
{
//Calling All Records Saved in the File
textcolor(GREEN);
clrscr();
box(12,3,69,5);
gotoxy(31,4);
textcolor(CYAN + BLINK);
cprintf("BANK OF PAKISTAN");
box(16,7,65,20);
textcolor(CYAN);
gotoxy(29,7);
cprintf(" ++ VIEW ALL ACCOUNT ++ ");
_setcursortype(_NOCURSOR);
gotoxy(27,10);
cprintf("ACCOUNT NO : %s",b->id);
gotoxy(27,12);
cprintf("PERSON NAME : %s",b->name);
gotoxy(27,14);
cprintf("OPENING DATE : %d-%d-%d",b->day,b->month,b->year);
gotoxy(27,16);
cprintf("CURR BALANCE : %.00lf",b->bal);
textcolor(YELLOW);
gotoxy(19,19);cputs(b->id);
gotoxy(26,19);cputs(b->name);
gotoxy(46,19);cprintf("%d-%d-%d",b->day,b->month,b->year);
gotoxy(59,19);cprintf("%.00lf",b->bal);
getch();
}
if(b->status == 1)
{
clrscr();
box(26,12,55,14);
_setcursortype(_NOCURSOR);
textcolor(YELLOW + BLINK);
gotoxy(28,13);
cputs("*** RECORD NOT FOUND ***");
getch();
}
fclose(f);
}
else
{
clrscr();
box(26,12,55,14);
_setcursortype(_NOCURSOR);
textcolor(YELLOW + BLINK);
gotoxy(28,13);
cputs("*** ERROR OPENING FILE ***");
getch();
}
viewmenu();
FILE *f;
int r = 11;
double n;
f = fopen("Bank.dat", "rb");
if (f != NULL)
{
textcolor(GREEN);
clrscr();
box(12,2,69,4);
_setcursortype(_NOCURSOR);
gotoxy(31,3);
textcolor(CYAN + BLINK);
cprintf("BANK OF PAKISTAN");
box(8,7,73,24);
textcolor(CYAN);
gotoxy(25,7);
cprintf(" ++ ALL RECORDS OF DATABASE ++ ");
textcolor(RED);
gotoxy(10,9);
cprintf("ACCOUNT NO. NAME OPENING DATE BALANCE");
if(b->status == 0)
{
if(r == 22)
{
textcolor(YELLOW);
gotoxy(10,23);
cprintf("PRESS ANY KEY TO CONTINUE...");
getch();
textcolor(GREEN);
clrscr();
box(12,2,69,4);
gotoxy(31,3);
textcolor(CYAN + BLINK);
cprintf("BANK OF PAKISTAN");
box(8,7,73,24);
textcolor(CYAN);
gotoxy(25,7);
cprintf(" ++ ALL RECORDS OF DATABASE ++ ");
textcolor(RED);
gotoxy(10,9);
cprintf("ACCOUNT NO. NAME OPENING DATE BALANCE");
r = 11;
}
else
{
textcolor(CYAN);
gotoxy(12,r);
cputs(b->id);
gotoxy(26,r);
cputs(b->name);
gotoxy(50,r);
cprintf("%d-%d-%d",b->day,b->month,b->year);
gotoxy(65,r);
cprintf("%.00lf",b->bal);
r++;
}
}
}
fclose(f);
textcolor(YELLOW);
gotoxy(10,23);
cputs("END OF RECORDS");
gotoxy(54,23);
cputs("TOTAL RECORDS : ");
cout<<n;
getch();
}
else
{
clrscr();
box(26,12,55,14);
_setcursortype(_NOCURSOR);
textcolor(YELLOW + BLINK);
gotoxy(28,13);
cputs("*** ERROR OPENING FILE ***");
getch();
}
viewmenu();
FILE *f;
clrscr();
putc('\n',stdprn);
fputs("\n\t\t\tREPRT OF SALES",stdprn);
putc('\n',stdprn);
fputs("===========================",stdprn);
putc('\n',stdprn);
putc('\n',stdprn);
gotoxy(10,9);
fprintf(stdprn,"ACCOUNT NO. NAME OPENING DATE BALANCE");
putc('\n',stdprn);
putc('\n',stdprn);
f = fopen("Bank.dat","rb");
fclose(f);
int i;
char del[NUM];
char ch;
FILE *f, *fd;
textcolor(GREEN);
clrscr();
_setcursortype(_SOLIDCURSOR);
f = fopen("Bank.dat","rb");
fd = fopen("Temp.dat","wb");
if (f != NULL)
{
box(12,3,69,5);
gotoxy(31,4);
textcolor(CYAN + BLINK);
cputs("BANK OF PAKISTAN");
box(16,7,65,22);
textcolor(CYAN);
gotoxy(30,7);
cputs(" ++ DELETE ACCOUNT ++ ");
gotoxy(24,9);
cputs("ENTER ACCOUNT NO. TO DELETE : ");
check_id(del, NUM);
_setcursortype(_NOCURSOR);
if (strcmp(del, b->id)== 0)
{
i++;
gotoxy(27,12);
cprintf("ACCOUNT NO : %s",b->id);
gotoxy(27,14);
cprintf("PERSON NAME : %s",b->name);
gotoxy(27,16);
cprintf("OPENING DATE : %d-%d-%d",b->day,b->month,b->year);
gotoxy(27,18);
cprintf("CURR BALANCE : %.00lf",b->bal);
textcolor(YELLOW);
gotoxy(19,21);cputs(b->id);
gotoxy(26,21);cputs(b->name);
gotoxy(46,21);cprintf("%d-%d-%d",b->day,b->month,b->year);
gotoxy(59,21);cprintf("%.00lf",b->bal);
gotoxy(24,23);
cputs("ARE U SURE U WANT TO DELETE ? :- ");
ch = getche();
}
}
fclose(f);
fclose(fd);
remove("Bank.dat");
rename("Temp.dat","Bank.dat");
menu();
else
{
clrscr();
box(26,12,55,14);
_setcursortype(_NOCURSOR);
textcolor(YELLOW + BLINK);
gotoxy(28,13);
cputs("*** ERROR OPENING FILE ***");
getch();
}
menu();
int i;
char no[NUM];
FILE *f;
textcolor(GREEN);
clrscr();
_setcursortype(_SOLIDCURSOR);
f = fopen("Bank.dat","rb");
if (f != NULL)
{
box(12,3,69,5);
gotoxy(31,4);
textcolor(CYAN + BLINK);
cputs("BANK OF PAKISTAN");
box(16,7,65,22);
textcolor(CYAN);
gotoxy(30,7);
cputs(" ++ SEARCH ACCOUNT ++ ");
gotoxy(24,9);
cputs("ENTER ACCOUNT NO. TO SEARCH : ");
check_id(no, NUM);
_setcursortype(_NOCURSOR);
rewind(f);
if (strcmp(no, b->id) == 0)
{
i++;
gotoxy(27,12);
cprintf("ACCOUNT NO : %s",b->id);
gotoxy(27,14);
cprintf("PERSON NAME : %s",b->name);
gotoxy(27,16);
cprintf("OPENING DATE : %d-%d-%d",b->day,b->month,b->year);
gotoxy(27,18);
cprintf("CURR BALANCE : %.00lf",b->bal);
textcolor(YELLOW);
gotoxy(19,21);cputs(b->id);
gotoxy(26,21);cputs(b->name);
gotoxy(46,21);cprintf("%d-%d-%d",b->day,b->month,b->year);
gotoxy(59,21);cprintf("%.00lf",b->bal);
fflush(stdin);
getch();
}
}
}
else
{
clrscr();
box(26,12,55,14);
_setcursortype(_NOCURSOR);
textcolor(YELLOW + BLINK);
gotoxy(28,13);
cputs("*** ERROR OPENING FILE ***");
getch();
}
fclose(f);
searchmenu();
int i;
char nm[MAX];
FILE *f;
textcolor(GREEN);
clrscr();
_setcursortype(_SOLIDCURSOR);
f = fopen("Bank.dat","rb");
if (f != NULL)
{
box(12,3,69,5);
gotoxy(31,4);
textcolor(CYAN + BLINK);
cputs("BANK OF PAKISTAN");
box(16,7,65,22);
textcolor(CYAN);
gotoxy(30,7);
cputs(" ++ SEARCH ACCOUNT ++ ");
gotoxy(18,9);
cputs("ENTER NAME TO SEARCH : ");
check_name(nm, MAX);
_setcursortype(_NOCURSOR);
rewind(f);
if (strcmp(nm, b->name) == 0)
{
i++;
gotoxy(27,12);
cprintf("ACCOUNT NO : %s",b->id);
gotoxy(27,14);
cprintf("PERSON NAME : %s",b->name);
gotoxy(27,16);
cprintf("OPENING DATE : %d-%d-%d",b->day,b->month,b->year);
gotoxy(27,18);
cprintf("CURR BALANCE : %.00lf",b->bal);
textcolor(YELLOW);
gotoxy(19,21);cputs(b->id);
gotoxy(26,21);cputs(b->name);
gotoxy(46,21);cprintf("%d-%d-%d",b->day,b->month,b->year);
gotoxy(59,21);cprintf("%.00lf",b->bal);
fflush(stdin);
getch();
}
}
}
else
{
clrscr();
box(26,12,55,14);
_setcursortype(_NOCURSOR);
textcolor(YELLOW + BLINK);
gotoxy(28,13);
cputs("*** ERROR OPENING FILE ***");
getch();
}
fclose(f);
searchmenu();
char ch[MIN];
int r = 12, m = 0;
FILE *f;
textcolor(GREEN);
clrscr();
_setcursortype(_SOLIDCURSOR);
f = fopen("Bank.dat","rb");
if (f != NULL)
{
box(12,2,69,4);
gotoxy(31,3);
textcolor(CYAN + BLINK);
cputs("BANK OF PAKISTAN");
box(8,8,73,24);
textcolor(CYAN);
gotoxy(27,8);
cprintf(" ++ ALL MATCHING RESULTS ++ ");
textcolor(RED);
gotoxy(10,10);
cprintf("ACCOUNT NO. NAME OPENING DATE BALANCE");
textcolor(CYAN);
gotoxy(22,6);
cputs("ENTER Ist LETTER OF NAME TO SEARCH : ");
check_name(ch, MIN);
rewind(f);
_setcursortype(_NOCURSOR);
if(b->name[m] == ch[m])
{
if(r == 22)
{
textcolor(YELLOW);
gotoxy(10,23);
cprintf("PRESS ANY KEY TO CONTINUE...");
getch();
textcolor(GREEN);
clrscr();
box(12,2,69,4);
gotoxy(31,3);
textcolor(CYAN + BLINK);
cprintf("BANK OF PAKISTAN");
box(6,8,73,24);
textcolor(CYAN);
gotoxy(25,8);
cprintf(" ++ ALL MATCHING RESULTS ++ ");
textcolor(RED);
gotoxy(10,10);
cprintf("ACCOUNT NO. NAME OPENING DATE BALANCE");
r = 12;
}
else
{
textcolor(CYAN);
gotoxy(12,r);
cputs(b->id);
gotoxy(26,r);
cputs(b->name);
gotoxy(50,r);
cprintf("%d-%d-%d",b->day,b->month,b->year);
gotoxy(66,r);
cprintf("%.00lf",b->bal);
r++;
}
}
}
fclose(f);
textcolor(YELLOW);
gotoxy(10,23);
cputs("END OF RECORDS");
getch();
else
{
clrscr();
box(26,12,55,14);
_setcursortype(_NOCURSOR);
textcolor(YELLOW + BLINK);
gotoxy(28,13);
cputs("*** ERROR OPENING FILE ***");
getch();
}
searchmenu();
* WELCOME SCREEN *
void splash()
{
textcolor(GREEN);
clrscr();
_setcursortype(_NOCURSOR);
box(12,3,69,5);
gotoxy(31,4);
textcolor(CYAN + BLINK);
cprintf("BANK OF PAKISTAN");
box(12,9,69,18);
gotoxy(35,10);
textcolor(CYAN + BLINK);
cprintf("* WELCOME *");
gotoxy(24,13);
textcolor(RED);
cprintf("PROGRAMMED BY : ");
gotoxy(16,16);
cprintf("COPYRIGHTS :-");
textcolor(YELLOW);
gotoxy(44,13);
cprintf("MUHAMMAD WASIF");
gotoxy(30,17);
cprintf("HAJVERI PROGRAMMARS [PVT] LIMITED");
delay(3000);
password();
}
void password()
{
textcolor(GREEN);
clrscr();
box(12,3,69,5);
gotoxy(31,4);
textcolor(CYAN + BLINK);
cprintf("BANK OF PAKISTAN");
box(16,8,65,22);
gotoxy(30,9);
textcolor(CYAN + BLINK);
cprintf("WELCOME MUHAMMAD WASIF");
box(16,11,65,13);
textcolor(CYAN);
gotoxy(38,12);
cprintf("LOGIN");
gotoxy(28,16);
textcolor(9);
cprintf("ENTER PASSWORD : ");
textcolor(RED);
_setcursortype(_SOLIDCURSOR);
if (ps == '\r')
break;
else
{
p[i] = ps;
c++;
i++;
}
if (i > 12) break;
}
p[i] = '\0';
_setcursortype(_NOCURSOR);
if(strcmp(p,pass) == 0)
{
gotoxy(28,18);
textcolor(YELLOW + BLINK);
cprintf("YOU ARE SUCCESSFULY LOGIN... ");
delay(3000);
menu();
}
else
{
gotoxy(27,18);
cprintf("SORRY! ACCESS DENIED..... ");
gotoxy(27,20);
cprintf("LET'S TRY AGAIN [Y]/[N] : ");
ch = getche();
}
}
* MAIN MENU OF PROGRAM *
void menu()
{
int a;
int d = 1;
char choice;
textcolor(GREEN);
clrscr();
box(26,3,55,5);
textcolor(CYAN + BLINK);
gotoxy(28,4);
cprintf("+++BANK OF PAKISTAN+++");
box(26,6,55,8);
gotoxy(33,7);
textcolor(CYAN);
cprintf("***** MENU *****");
box(26,9,55,20);
for(int i=0;i<8;i++)
{
gotoxy(35,11+i);
textcolor(9);
cprintf(" %s ",ch[i]);
}
_setcursortype(_NOCURSOR);
textcolor(GREEN);
gotoxy(25,22);
cputs("================================");
gotoxy(25,24);
cputs("================================");
while(1)
{
kee:
for(a = 1; a <= 8; ++a)
{
if(a == d)
{
if (d == 1)
{
textcolor(RED); gotoxy(37,11);cprintf("ADD NEW ACCOUNT");
textcolor(CYAN);gotoxy(30,11); cputs("¯¯>");
gotoxy(27,23);cputs("PRESS ENTER TO ADD NEW RECORD");
}
else if (d == 2)
{
textcolor(RED); gotoxy(37,12);cprintf("DEPOSIT MONEY");
gotoxy(30,12); textcolor(CYAN); cputs("¯¯>");
gotoxy(27,23);cputs("PRESS ENTER TO DEPOSIT MONEY");
}
else if (d == 3)
{
textcolor(RED); gotoxy(37,13);cprintf("WITHDRAW MONEY");
gotoxy(30,13);textcolor(CYAN); cputs("¯¯>");
gotoxy(27,23);cputs("PRESS ENTER TO WITHDRAW MONEY");
}
else if (d == 4)
{
textcolor(RED); gotoxy(37,14);cprintf("VIEW ACCOUNTS");
gotoxy(30,14);textcolor(CYAN); cputs("¯¯>");
gotoxy(27,23);cputs("PRESS ENTER TO VIEW RECORDS");
}
else if (d == 5)
{
textcolor(RED); gotoxy(37,15);cprintf("DELETE ACCOUNT");
gotoxy(30,15);textcolor(CYAN); cputs("¯¯>");
gotoxy(27,23);cputs("PRESS ENTER TO DELETE RECORD");
}
else if (d == 6)
{
textcolor(RED); gotoxy(37,16);cprintf("SEARCH ACCOUNT");
gotoxy(30,16);textcolor(CYAN); cputs("¯¯>");
gotoxy(27,23);cputs("PRESS ENTER TO SEARCH RECORD");
}
else if (d == 7)
{
textcolor(RED); gotoxy(37,17);cprintf("** HELP **");
gotoxy(30,17);textcolor(CYAN); cputs("¯¯>");
gotoxy(28,23);cputs("PRESS ENTER TO VIEW HELP");
}
else if (d == 8)
{
textcolor(RED); gotoxy(37,18);cprintf("** EXIT **");
gotoxy(30,18);textcolor(CYAN); cputs("¯¯>");
gotoxy(27,23);cputs("PRESS ENTER TO EXIT PROGRAM");
}
}
else
{
if (a == 1)
{
textcolor(9); gotoxy(37,11);cprintf("ADD NEW ACCOUNT");
textcolor(CYAN);gotoxy(30,11); cputs(" ");
gotoxy(27,23);clreol();
}
else if (a == 2)
{
textcolor(9); gotoxy(37,12);cprintf("DEPOSIT MONEY");
gotoxy(30,12);cputs(" ");
}
else if (a == 3)
{
textcolor(9); gotoxy(37,13);cprintf("WITHDRAW MONEY");
gotoxy(30,13);cputs(" ");
}
else if (a == 4)
{
textcolor(9); gotoxy(37,14);cprintf("VIEW ACCOUNTS");
gotoxy(30,14);cputs(" ");
}
else if (a == 5)
{
textcolor(9); gotoxy(37,15);cprintf("DELETE ACCOUNT");
gotoxy(30,15);cputs(" ");
}
else if (a == 6)
{
textcolor(9); gotoxy(37,16);cprintf("SEARCH ACCOUNT");
gotoxy(30,16);cputs(" ");
}
else if (a == 7)
{
textcolor(9); gotoxy(37,17);cprintf("** HELP **");
gotoxy(30,17);cputs(" ");
}
else if (a == 8)
{
textcolor(9); gotoxy(37,18);cprintf("** EXIT **");
gotoxy(30,18);cputs(" ");
}
}
}
choice = getch();
if (choice == 13)
{
if (d == 1) add(&b);
if (d == 2) deposit(&b);
if (d == 3) withdraw(&b);
if (d == 4) viewmenu();
if (d == 5) delet(&b);
if (d == 6) searchmenu();
if (d == 7) helpmenu();
if (d == 8) quit();
}
if (choice == 0)
{
choice = getch();
if (choice == 80)
{
d++;
if (d > 8) d = 1;
goto kee;
}
if (choice == 72)
{
d--;
if (d < 1) d = 8;
goto kee;
}
}
}
* VIEW MENU *
void viewmenu()
{
textcolor(GREEN);
clrscr();
box(26,3,55,5);
textcolor(CYAN + BLINK);
gotoxy(28,4);
cprintf("+++BANK OF PAKISTAN+++");
box(31,8,50,10);
gotoxy(33,9);
textcolor(CYAN);
cprintf("** VIEW MENU **");
box(26,12,55,19);
_setcursortype(_NOCURSOR);
textcolor(GREEN);
gotoxy(25,22);
cputs("================================");
gotoxy(25,24);
cputs("================================");
while(1)
{
kee:
for(a = 1; a <= 4; ++a)
{
if(a == d)
{
if (d == 1)
{
gotoxy(37,14);textcolor(RED);cprintf("ONE BY ONE");
gotoxy(30,14);textcolor(CYAN); cputs("¯¯>");
gotoxy(26,23);cputs("PRESS ENTER TO VIEW ONE BY ONE");
}
else if (d == 2)
{
gotoxy(37,15);textcolor(RED);cprintf("VIEW ALL");
gotoxy(30,15);textcolor(CYAN); cputs("¯¯>");
gotoxy(26,23);cputs("PRESS ENTER TO VIEW ALL RECORD");
}
else if (d == 3)
{
gotoxy(37,16);textcolor(RED);cprintf("PRINT REC.");
gotoxy(30,16);textcolor(CYAN); cputs("¯¯>");
gotoxy(26,23);cputs("PRESS ENTER TO GO BACK TO MAIN");
}
else if (d == 4)
{
gotoxy(37,17);textcolor(RED);cprintf("<< BACK >>");
gotoxy(30,17);textcolor(CYAN); cputs("¯¯>");
gotoxy(26,23);cputs("PRESS ENTER TO GO BACK TO MAIN");
}
}
else
{
if (a == 1)
{
gotoxy(37,14);textcolor(9);cprintf("ONE BY ONE");
gotoxy(30,14);cputs(" ");
gotoxy(27,23);clreol();
}
else if (a == 2)
{
gotoxy(37,15);textcolor(9);cprintf("VIEW ALL");
gotoxy(30,15);cputs(" ");
}
else if (a == 3)
{
gotoxy(37,16);textcolor(9);cprintf("PRINT REC.");
gotoxy(30,16);cputs(" ");
}
else if (a == 4)
{
gotoxy(37,17);textcolor(9);cprintf("<< BACK >>");
gotoxy(30,17);cputs(" ");
}
choice = getch();
if (choice == 13)
{
if (d == 1) view(&b);
if (d == 2) viewall(&b);
if (d == 3) print(&b);
if (d == 4) menu();
}
if (choice == 0)
{
choice = getch();
if (choice == 80)
{
d++;
if (d > 4) d = 1;
goto kee;
}
if (choice == 72)
{
d--;
if (d < 1) d = 4;
goto kee;
}
}
}
* SEARCH MENU *
void searchmenu()
{
textcolor(GREEN);
clrscr();
box(26,3,55,5);
textcolor(CYAN + BLINK);
gotoxy(28,4);
cprintf("+++BANK OF PAKISTAN+++");
box(31,8,50,10);
gotoxy(33,9);
textcolor(CYAN);
cprintf("* SEARCH MENU *");
box(26,12,55,19);
_setcursortype(_NOCURSOR);
textcolor(GREEN);
gotoxy(25,22);
cputs("================================");
gotoxy(25,24);
cputs("================================");
while(1)
{
kee:
for(a = 1; a <= 4; ++a)
{
if(a == d)
{
if (d == 1)
{
gotoxy(37,14);textcolor(RED);cprintf("SEARCH ACCOUNT");
gotoxy(30,14);textcolor(CYAN); cputs("¯¯>");
gotoxy(25,23);cputs("PRESS ENTER TO SEARCH BY ACCOUNT");
}
else if (d == 2)
{
gotoxy(37,15);textcolor(RED);cprintf("SEARCH NAME");
gotoxy(30,15);textcolor(CYAN); cputs("¯¯>");
gotoxy(26,23);cputs("PRESS ENTER TO SEARCH BY NAME");
}
else if (d == 3)
{
gotoxy(37,16);textcolor(RED);cprintf("SEARCH CASE");
gotoxy(30,16);textcolor(CYAN); cputs("¯¯>");
gotoxy(26,23);cputs("PRESS ENTER TO SEARCH BY CASE");
}
else if (d == 4)
{
gotoxy(37,17);textcolor(RED);cprintf("<<< BACK >>>");
gotoxy(30,17);textcolor(CYAN); cputs("¯¯>");
gotoxy(26,23);cputs("PRESS ENTER TO GO BACK TO MAIN");
}
}
else
{
if (a == 1)
{
gotoxy(37,14);textcolor(9);cprintf("SEARCH ACCOUNT");
gotoxy(30,14);cputs(" ");
gotoxy(27,23);clreol();
}
else if (a == 2)
{
gotoxy(37,15);textcolor(9);cprintf("SEARCH NAME");
gotoxy(30,15);cputs(" ");
}
else if (a == 3)
{
gotoxy(37,16);textcolor(9);cprintf("SEARCH CASE");
gotoxy(30,16);cputs(" ");
}
else if (a == 4)
{
gotoxy(37,17);textcolor(9);cprintf("<<< BACK >>>");
gotoxy(30,17);cputs(" ");
}
choice = getch();
if (choice == 13)
{
if (d == 1) searchid(&b);
if (d == 2) searchname(&b);
if (d == 3) searchcase(&b);
if (d == 4) menu();
}
if (choice == 0)
{
choice = getch();
if (choice == 80)
{
d++;
if (d > 4) d = 1;
goto kee;
}
if (choice == 72)
{
d--;
if (d < 1) d = 4;
goto kee;
}
}
}
}
* HELP MENU *
void helpmenu()
{
textcolor(GREEN);
clrscr();
box(26,3,55,5);
textcolor(CYAN + BLINK);
gotoxy(28,4);
cprintf("+++BANK OF PAKISTAN+++");
box(8,6,28,8);
gotoxy(12,7);
textcolor(CYAN);
cprintf("* HELP MENU *");
box(6,10,30,17);
_setcursortype(_NOCURSOR);
textcolor(GREEN);
gotoxy(5,22);
cputs("===========================");
gotoxy(5,24);
cputs("===========================");
while(1)
{
kee:
for(a = 1; a <= 4; ++a)
{
if(a == d)
{
textcolor(CYAN);
if (d == 1)
{
gotoxy(13,12);textcolor(RED);cprintf("*INTRODUCTION*");
gotoxy(8,12); textcolor(CYAN); cputs("¯>");
gotoxy(5,23); cputs("PRESS ENTER FOR INTRODUCTION");
}
else if (d == 2)
{
gotoxy(13,13);textcolor(RED);cprintf("*HOW TO USE ?*");
gotoxy(8,13); textcolor(CYAN); cputs("¯>");
gotoxy(5,23); cputs("PRESS ENTER TO LEARN USAGE");
}
else if (d == 3)
{
gotoxy(13,14);textcolor(RED);cprintf("**ABOUT BANK**");
gotoxy(8,14); textcolor(CYAN); cputs("¯>");
gotoxy(7,23); cputs("PRESS ENTER FOR CONTACT");
}
else if (d == 4)
{
gotoxy(13,15);textcolor(RED);cprintf("<<< BACK >>>");
gotoxy(8,15); textcolor(CYAN); cputs("¯>");
gotoxy(7,23); cputs("PRESS ENTER TO GO BACK");
}
}
else
{
if (a == 1)
{
gotoxy(13,12);textcolor(9);cprintf("*INTRODUCTION*");
gotoxy(8,12); cputs(" ");
gotoxy(5,23); clreol();
}
else if (a == 2)
{
gotoxy(13,13);textcolor(9);cprintf("*HOW TO USE ?*");
gotoxy(8,13); cputs(" ");
}
else if (a == 3)
{
gotoxy(13,14);textcolor(9);cprintf("**ABOUT BANK**");
gotoxy(8,14); cputs(" ");
}
else if (a == 4)
{
gotoxy(13,15);textcolor(9);cprintf("<<< BACK >>>");
gotoxy(8,15); cputs(" ");
}
choice = getch();
if (choice == 13)
{
if (d == 1) intro();
if (d == 2) usage();
if (d == 3) about();
if (d == 4) menu();
}
if (choice == 0)
{
choice = getch();
if (choice == 80)
{
d++;
if (d > 4) d = 1;
goto kee;
}
if (choice == 72)
{
d--;
if (d < 1) d = 4;
goto kee;
}
}
}
void intro()
{
textcolor(GREEN);
box(35,6,75,22);
_setcursortype(_NOCURSOR);
textcolor(RED);
gotoxy(38,8);
cputs("BANK OF PAKISTAN is a SOFTWARE that");
gotoxy(38,9);
cputs("can used for Simple Bank Management");
gotoxy(38,10);
cputs("Purpose. It has a Beautiful GUI for");
gotoxy(38,11);
cputs("Easy Understanding for the Users.");
gotoxy(38,13);
cputs("Just Press Enter on The Option You");
gotoxy(38,14);
cputs("Want to View");
gotoxy(39,17);
cputs("PLZ! Give Me Your Comments About");
gotoxy(39,18);
cputs("The Software [BANK OF PAKISTAN].");
textcolor(YELLOW);
gotoxy(39,21);
cputs("For Contact PLZ Read ABOUT Option");
getch();
helpmenu();
* HOW TO USE *
void usage()
{
textcolor(GREEN);
box(35,6,75,22);
_setcursortype(_NOCURSOR);
textcolor(RED);
gotoxy(38,8);
cputs("Simply By using Arrows Keys Move in");
gotoxy(38,9);
cputs("The Program as You Want. I Also Try");
gotoxy(38,10);
cputs("To Guide You Through The Instruction");
gotoxy(38,11);
cputs("Which Appaears Bottom of The Screen.");
gotoxy(38,12);
cputs("Just Follow The Instruction to Work.");
gotoxy(39,14);
cputs("If You Put a Wrong Entry in Search,");
gotoxy(39,15);
cputs("Deletint,Deposit & Withdraw Section");
gotoxy(39,16);
cputs("You'll Back to Prev Window.");
gotoxy(37,18);
cputs("Printing Option may not Work Properly");
gotoxy(39,20);
cputs("If Still Then You Face Any Problem");
textcolor(YELLOW);
gotoxy(39,21);
cputs("Plz! Mail: wasi_javed@hotmail.com");
getch();
helpmenu();
void about()
{
textcolor(GREEN);
box(35,6,75,22);
_setcursortype(_NOCURSOR);
textcolor(CYAN);
gotoxy(48,8);
cputs("*** MADE BY ***");
gotoxy(48,12);
cputs("*** CONTACT ***");
gotoxy(47,16);
cputs("*** COPYRIGHT ***");
textcolor(RED);
gotoxy(46,10);
cputs("MUHAMMAD WASIF JAVED");
gotoxy(43,14);
cputs("www.wasi_javed@hotmail.com");
gotoxy(40,18);
cputs("HAJVERI PROGRAMARS [PVT] LIMITED");
textcolor(YELLOW);
gotoxy(37,21);
cputs("PLZ! MAIL AS SUBJECT BANK OF PAKISTAN");
getch();
helpmenu();
void quit()
{
char ch;
textcolor(GREEN);
clrscr();
_setcursortype(_NOCURSOR);
box(26,5,55,7);
textcolor(CYAN + BLINK);
gotoxy(29,6);
cputs("++++BANK OF PAKISTAN++++");
box(15,12,66,16);
textcolor(CYAN);
gotoxy(18,14);
cputs("ARE YOU SURE YOU WANT TO EXIT ? [Y] / [N] : ");
ch = getche();
else
quit();
END OF PROGRAM
REMARKS :-
Thanks to Almighty Allah Whom give me the so much Knowledge to Create this
Program Name “BANK OF PAKISTAN”.
Which Provide me not only the Ideas but New Techniques for Programming in C
& C++.
A very very Special Thanks to My Teacher Sir Mian Adnan Ameen who
taught me so well.
Because of him I feel comfortable to make database program easily in C & C++.