-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOrderMenu.cpp
57 lines (39 loc) · 1.04 KB
/
OrderMenu.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <vector>
#include "screenControl.h"
#include "Dao.h"
#include "OrderManage.h"
#include "OrderMenu.h"
using namespace std;
void OrderMenu::printSrc()
{
while (1) {
clrscr();
print_screen("./screen/ordermanagement_screen.txt");
vector<OrdersDto> orders = selectOrders();
int i = 0;
for (OrdersDto order : orders) {
MembersDto member = findByMemberId(order.member_id);
ItemsDto item = findByItemId(order.item_id);
gotoxy(5, 11 + i++);
printf("주문 품목 : %s\t주문 개수 : %d\t주문자 : %10s\t주문상태 : %s", item.name, order.quantity, member.name, order.status);
}
int s = cursorControl(4, 11, 11 + orders.size() - 1, 1);
gotoxy(3, s);
printf("*");
int orderIndex = s - 11;
int y = cursorControl(31, 23, 25, 2);
switch (y) {
// 디비 연결 후 주문 리스트 클릭 했을 시 넘어가는 화면 구성해야함
case CLICK:
OrderManage ordermanage;
ordermanage.setOrderIndex(orderIndex);
ordermanage.printSrc();
break;
case BACK:
return;
}
}
}