mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
before interface 13.11.2024
This commit is contained in:
@@ -15,22 +15,51 @@ public:
|
||||
DataBaseLMS();
|
||||
~DataBaseLMS();
|
||||
|
||||
public:
|
||||
protected:
|
||||
public:
|
||||
//Подключение
|
||||
bool createConnection();
|
||||
void deleteConnection();
|
||||
|
||||
//Транзакции
|
||||
bool transactionBegin();
|
||||
bool transactionEnd();
|
||||
|
||||
//Списки
|
||||
QList<Instructor> selectAllInstructors();
|
||||
QList<Trainee> selectAllTrainees();
|
||||
QList<Group> selectAllGroups();
|
||||
|
||||
//Инструктор
|
||||
Instructor selectInstructor(int id_instructor);
|
||||
int selectInstructorID(QString login, QString password = QStringLiteral(""));
|
||||
bool selectInstructorIsAdmin(int id_instructor);
|
||||
bool selectInstructorLoggedIn(int id_instructor);
|
||||
bool selectInstructorArchived(int id_instructor);
|
||||
int updateInstructorLoggedIn(int id_instructor, bool loggedIn);
|
||||
int updateInstructorArchived(int id_instructor, bool archived);
|
||||
|
||||
int insertInstructor();
|
||||
int insertInstructor(Instructor instructor);
|
||||
int deleteInstructor(int instructor_id);
|
||||
int deleteInstructor(int id_instructor);
|
||||
int updateInstructor(Instructor instructor);
|
||||
|
||||
//Группа
|
||||
Group selectGroup(int id_group);//
|
||||
int insertGroup();//
|
||||
int insertGroup(Group group);
|
||||
int deleteGroup(int group_id);
|
||||
int updateGroup(Group group);
|
||||
|
||||
//Обучаемый
|
||||
Trainee selectTrainee(int id_trainee);//
|
||||
int selectTraineeID(QString login, QString password = QStringLiteral(""));//
|
||||
bool selectTraineeArchived(int id_trainee);//
|
||||
bool selectTraineeLoggedIn(int id_trainee);//
|
||||
int updateTraineeLoggedIn(int id_trainee, bool loggedIn);//
|
||||
int updateTraineeArchived(int id_trainee, bool archived);//
|
||||
|
||||
int insertTrainee(int id_group);//
|
||||
int insertTrainee(Trainee trainee);
|
||||
int deleteTrainee(int trainee_id);
|
||||
int updateTrainee(Trainee trainee);
|
||||
@@ -38,11 +67,13 @@ public:
|
||||
QList<Task> selectTasksOfTrainee(int trainee_id);
|
||||
|
||||
private:
|
||||
int queryExec(QString queryStr);
|
||||
void messageWarningErrorQuery(QString queryStr);
|
||||
int queryExecInt(QString queryStr);
|
||||
//bool queryExecBool(QString queryStr);
|
||||
void messageWarningErrorQuery(QString queryStr, QSqlQuery* query);
|
||||
|
||||
private:
|
||||
QSqlDatabase* db;
|
||||
bool transactionBegined;
|
||||
const QString dbName = "DataBaseLMS";
|
||||
const QString dbUserName = "postgres";
|
||||
const QString dbPassword = "12345678";
|
||||
|
||||
Reference in New Issue
Block a user