void Queries_Menu(void){ char choice; do { system("cls"); printf("\n==================================================================\n"); printf("************************Information Queries*************************\n"); printf("[S]tudio Query.\n"); printf("[P]lay Query.\n"); printf("[T]icket Query.\n"); printf("S[c]hedule Queries\n"); printf("[R]eturn.\n"); printf("\n==================================================================\n"); printf("Please input your choice:"); fflush(stdin); choice = getchar(); switch (choice) { case 'S': case 's':Studio_query(); break; case 'P': case 'p': Play_UI_MgtEntry(1); break; case 'T': case 't': ListTickets(); break; case 'C': case 'c': Schedule_UI_ListAll(); break; } } while ('R' != choice && 'r' != choice); }
int main (void) { int a; printf ("0:剧目管理 2:演出厅管理"); scanf ("%d", &a); if ( a == 2) Studio_UI_MgtEntry (); else if (a == 1 || a == 0) Play_UI_MgtEntry (a); return 0; }
void Main_Menu(void) { char choice; do { printf("\n==================================================================\n"); printf("**************** Theater Ticket Management System ****************\n"); printf("[S]tudio Management.\n"); printf("[P]lay Management.\n"); printf("[T]icket Sale.\n"); printf("[Q]Schedule\n"); //printf("Ra[n]king and Statistics.\n"); printf("[E]xist.\n"); printf("[X]seat"); printf("\n==================================================================\n"); printf("Please input your choice:"); fflush(stdin); choice = getchar(); switch (choice) { case 'S': case 's': Studio_UI_MgtEntry(); break; case 'P': case 'p': Play_UI_MgtEntry(); break; case 'Q': case 'q': Schedule_UI_MgtEntry(); break; case 'T': case 't': Sale_UI_MgtEntry(); break; //case 'N': //case 'n': // SalesAanalysis_UI_MgtEntry(); // break; case 'X': case 'x': Seat_UI_MgtEntry(); break; } } while ('E' != choice && 'e' != choice); }
void Play_UI_Browe(USER* user) { auto p = 1; system("cls"); auto KeyMaX = EntKeyPlay_Perst_CompNewKeys() - 1; Play_UI_LookByPage(p); char k[15]; strcpy_s(k, 15, GET_KEY()); while (strcmp(k, "Esc") != 0) { if (strcmp(k, "Right") == 0 && p <= KeyMaX / 5) { Play_UI_LookByPage(++p); } if (strcmp(k, "Left") == 0 && p > 1) { Play_UI_LookByPage(--p); } strcpy_s(k, 15, GET_KEY()); } Play_UI_MgtEntry(user); }
int Main() { studio_node_t *head; int listSize=0; int flag=2; char choice; do { printf("\n\t\t************************************\n"); printf("\t\t** [A] 演出厅管理 \n"); printf("\t\t** [B] 剧目管理 \n"); printf("\t\t** [C] 售票管理 \n"); printf("\t\t** [D] 查询菜单 \n"); printf("\t\t** [E] 票房统计 \n"); printf("\t\t** [f] 系统用户管理 \n"); printf("\t\t** [G] 推出 \n"); printf("\t\t*************************************\n"); printf("Please Input: "); scanf("%d",&choice); getchar(); switch(choice) { case 'a' :; case 'A' : List_Init(head, studio_node_t); Studio_UI_MgtEntry(head); break; case 'b' :; case 'B' : Play_UI_MgtEntry(flag); break; case 'C' :; case 'c' : Schedule_UI_ListAll(); break; } }while(choice!='G' || choice!='g'); }
void Play_UI_Add(USER* user) { system("cls"); BIOS_GOTO_BOX(22, 100, 5, 25); BIOS_GOTO_BOX(22, 100, 8, 7); PLAY* Play_add; Play_add = static_cast<PLAY *>(malloc(sizeof(PLAY))); TTMS_GotoXY(52, 6); printf_s("增加剧目信息"); TTMS_GotoXY(47, 9); printf_s("剧目名称:"); TTMS_GotoXY(47, 11); printf_s("出产地区:"); TTMS_GotoXY(47, 13); printf_s("剧目时长:"); TTMS_GotoXY(47, 15); printf_s("剧目价格:"); TTMS_GotoXY(35, 17); printf_s("类型:"); TTMS_GotoXY(46, 17); printf_s("电影"); TTMS_GotoXY(61, 17); printf_s("歌剧"); TTMS_GotoXY(76, 17); printf_s("音乐会"); TTMS_GotoXY(35, 19); printf_s("等级:"); TTMS_GotoXY(46, 19); printf_s("小孩"); TTMS_GotoXY(61, 19); printf_s("青年"); TTMS_GotoXY(76, 19); printf_s("成人"); TTMS_GotoXY(57, 9); scanf_s("%s", Play_add->data.name, 31); TTMS_GotoXY(57, 11); scanf_s("%s", Play_add->data.area, 9); TTMS_GotoXY(57, 13); scanf_s("%d", &Play_add->data.duration); TTMS_GotoXY(57, 15); scanf_s("%d", &Play_add->data.price); GET_OC(43, 17, 73, 17, 0, 15, "->", 1, 0); switch (GET_CURSOR_X()) { case 45: Play_add->data.type = PLAY_TYPE_FLIM; break; case 60: Play_add->data.type = PLAY_TYPE_OPEAR; break; case 75: Play_add->data.type = PLAY_TYPE_CONCERT; break; default: break; } GET_OC(43, 19, 73, 19, 0, 15, "->", 1, 0); switch (GET_CURSOR_X()) { case 45: Play_add->data.rating = PLAY_RATE_CHILD; break; case 60: Play_add->data.rating = PLAY_RATE_TEENAGE; break; case 75: Play_add->data.rating = PLAY_RATE_ADULT; break; default: break; } if (Play_Srv_Add(Play_add) == 0) { TTMS_GotoXY(48, 23); printf_s("添加失败,完全相同剧目已存在"); _getch(); Play_UI_MgtEntry(user); } TTMS_GotoXY(48, 23); printf_s("添加成功,任意键返回"); _getch(); Play_UI_MgtEntry(user); }