void main()
{
  int choice;
  clrscr();
  welcome();
  do
  {
	 clrscr();
	 cout<<"\n\n\n\n\n\n\t\t\tMAIN MENU";
	 cout<<"\n\n\t\t01. RESULT MENU";
	 cout<<"\n\n\t\t02. ENTRY/EDIT MENU";
	 cout<<"\n\n\t\t03. EXIT";
	 cout<<"\n\n\n\n\tPlease Select Your Option(1/2/3)...";
	 cin>>choice;
	 clrscr();
	 switch(choice)
	  {
	  case 1: result();
		 break;
	  case 2: entry_menu();
		 break;
	  case 3: exit(0);
		 break;
	  default:cout<<"Wrong choice entered.Please try again...!!";
		  cout<<"\a";
	  }
	}while(choice!=3);
}
Exemple #2
0
void entry_menu()
{
	char ch;
	int num;
     cleardevice();
     start();
 
 settextstyle(TRIPLEX_FONT,HORIZ_DIR,6);
	setcolor(LIGHTBLUE);
	outtextxy(25,40," ENTRY MENU ");
	setcolor(YELLOW);
	settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);

	outtextxy(60,150,"1)CREATE STUDENT RECORD");
	outtextxy(60,210,"2)DISPLAY ALL STUDENTS RECORDS");
	outtextxy(60,270,"3)SEARCH STUDENT RECORD");
	outtextxy(60,330,"4)MODIFY STUDENT RECORD");
	outtextxy(60,390,"5)GO BACK TO THE MAIN MENU");
	
	switch(getch())
	{
	case '1':	write_student(); break;
	case '2':	display_all(); break;
	case '3':	cout<<"\n\n\tPlease Enter The roll number "; cin>>num;
			    display_sp(num); break;
	case '4':	cout<<"\n\n\tPlease Enter The roll number "; cin>>num;
			modify_student(num);break;
	case '5':	cout<<"\n\n\tPlease Enter The roll number "; cin>>num;
			delete_student(num);break;
	case '6':	break;
	default:	cout<<"\a"; entry_menu();
	}
}
void entry_menu()
{
  int ch,num;
  clrscr();
  cout<<"\n\n\n\t\tENTRY MENU";
  cout<<"\n\n\t1.CREATE STUDENT RECORD";
  cout<<"\n\n\t2.DISPLAY ALL STUDENTS RECORD";
  cout<<"\n\n\t3.SEARCH STUDENT RECORD";
  cout<<"\n\n\t4.MODIFY STUDENT RECORD ";
  cout<<"\n\n\t5.DELETE STUDENT RECORD ";
  cout<<"\n\n\t6.RETURN TO MAIN MENU";
  cout<<"\n\nPlease Enter Your Choice(1-6).......";
  cin>>ch;
  clrscr();
  switch(ch)
  {
	  case 1:write_record();break;
	  case 2:read_record();break;
	  case 3:cout<<"\n\n\tPlease enter the roll no. of student ";
		 cin>>num;
		 display(num);
		 break;
	  case 4:cout<<"\n\n\tPlease enter the roll no. of student ";
		 cin>>num;
		 modify_record(num);
		 break;
	  case 5:cout<<"\n\n\tPlease enter the roll no. of student ";
		 cin>>num;
	    delete_record(num);
		 break;
     case 6:break;
     default : cout<<"\a";entry_menu();
  }
}
Exemple #4
0
void menu(void)
{
		settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);		//set text style for the options
		setcolor(WHITE);					//set colour for the fonts
		outtextxy(60,150,"1) RESULT MENU");	//setting the position and the font
		outtextxy(60,210,"2) ENTRY/EDIT MENU");		//setting the position and the font
		outtextxy(60,270,"3) EXIT");			//setting the position and the font

	while (1)          						//loop will folow untill key board hits
   {
	while(!(kbhit()))
	{
		printTitle();
	}

	switch(getch())                					// getting options from the user
	{
		case '1':

			settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);		//set text style for the options
			setcolor(0);					//set colour for the fonts
			outtextxy(60,150,"1) RESULT MENU");	//setting the position and the font
			settextstyle(TRIPLEX_FONT,HORIZ_DIR,5);		//set text style for the options
			setcolor(10);					//set colour for the fonts
			outtextxy(60,150,"1) RESULT MENU");	//setting the position and the font
			delay(500);

			result();
			cleardevice();
			start();
			showMenu();
			break;
			
		case '2':
			settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);		//set text style for the options
			setcolor(0);					//set colour for the fonts
			outtextxy(60,210,"2) ENTRY/EDIT MENU");	//setting the position and the font
			settextstyle(TRIPLEX_FONT,HORIZ_DIR,5);		//set text style for the options
			setcolor(10);					//set colour for the fonts
			outtextxy(60,210,"2) ENTRY/EDIT MENU");	//setting the position and the font
			delay(500);

			entry_menu();
			cleardevice();
			start();
			showMenu();
			break;
			
		case '3':
			settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);		//set text style for the options
			setcolor(0);					//set colour for the fonts
			outtextxy(60,270,"3) EXIT");			//setting the position and the font
			settextstyle(TRIPLEX_FONT,HORIZ_DIR,5);		//set text style for the options
			setcolor(10);					//set colour for the fonts
			outtextxy(60,270,"3) EXIT");			//setting the position and the font
			delay(500);

			end();
			cleardevice();
			start();
			showMenu();                                //	END FUNCTION IS CALLED AFTER
			break;
		default:
			inv();
	}
    }
}