-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathStuManagement.h
95 lines (66 loc) · 1.56 KB
/
StuManagement.h
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#ifndef STUSYSTEMGUI_STUMANAGEMENT_H
#define STUSYSTEMGUI_STUMANAGEMENT_H
#include "Student.h"
#include"Window.h"
#include<vector>
#include"PushButton.h"
#include "StudentDao.h"
#include"StuTable.h"
using namespace std;
class StuManagement {
private:
//∑‚◊∞≤Ÿ◊˜Œ™√∂柱‰¡ø
enum Operation {
ShowAll,
Add,
Del,
Update,
SearchByName
Menu=66
};
public:
StuManagement();
//∆Ù∂Øπ‹¿Ì¿‡
void run();
//≤Àµ•ΩÁ√Ê
int menu();
// ≤Èø¥À˘”–µƒ—ß…˙
vector<Student>showAllStu();
//‘ˆÃÌ—ß…˙
int AddStu();
//…æ≥˝—ß…˙
int DelStu();
//∏¸–¬—ß…˙
int UpdateStu();
//≤È’“
vector<Student>CheckByName();
//draw the background
void drawBackground();
//eventLoop
void eventLoop();
private:
ExMessage message;
//background picture
IMAGE backgroundPicture;
vector<PushButton*> menu_btns;
StudentDao studentDao;
private:
//the student's table
StuTable* stuTable;
//table's header
string tableHeader;
private:
//add Student button
unique_ptr<PushButton> addBtn;
//the EditLine to add STudent
unique_ptr<EditLine>addStuLine;
//del Student Button
unique_ptr<PushButton> delBtn;
//the EditLine to del STudent
unique_ptr<EditLine>delStuLine;
//update Btn
unique_ptr<PushButton>updateBtn;
//updateLine
unique_ptr<EditLine>updateLine;
};
#endif //STUSYSTEMGUI_STUMANAGEMENT_H