Exemplo n.º 1
0
void employee()
{
clearscr;
char tmp[50];
 char ch[]=".....ADD OR LIST EMPLOYEES.....\n\n ";
     int i=strlen(ch),k=20,option,j;

        for(j=0;j<i;j++)
        {
        gotoxy(k,5);
        printf("%c",ch[j]);
        Sleep(90);
        k+=2;}
        Sleep(500);

       printf("%s",
			"\n\n\n"
			"   1.  ADD Employee of your inventory \n"
			"   2.  SEE your employees Record \n"
			"   3.  RETURN to main menu \n"
			"\nEnter your choice:\t ");
			getstr(tmp,50,stdin);
			option=strtol(tmp,NULL,10);
			printf("\n");

			switch(option)
			{
			    case 1:add_employee();break;
			    case 2:list_employee();break;
			    case 3:inventory();break;
			}


}
Exemplo n.º 2
0
int main(void)
{
  Node *head = NULL;
  int sel;

  init_list(&head);

  while(1){
    sel=disp_menu();
    if(sel==0) break;
    switch(sel){
      case 1: add_employee(head); break;
      case 2: retrieve_employee(head); break;
      case 3: remove_employee(head); break;
      default: break;
    }
  }
  deallocate_list(head);

  system("pause");
  return 0;
}