-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstudentdao.h
55 lines (39 loc) · 884 Bytes
/
studentdao.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
/**
* todo
* communicate with the database in table 'student'
*
*/
#ifndef STUSYSTEMGUI_STUDENTDAO_H
#define STUSYSTEMGUI_STUDENTDAO_H
#include "ConnectDB.h"
#include "Student.h"
#include "ReadProperties.h"
#include <mysql.h>
#include<vector>
class StudentDao {
private:
//local host adress
char host[20];
//database user
char user[20];
//password
char pw[20];
//database name
char dbName[20];
//database port
int port;
//database connector
MYSQL* con;
public:
//getAllStudent function
vector<Student>GetAllStudent();
//AddStudent function
int AddStudent(Student student);
//Delete function
int DelStudent(int id);
//update function
int UpdateStudent(Student student);
//get Student by name
vector<Student> CheckByName(char name[]);
};
#endif //STUSYSTEMGUI_STUDENTDAO_H