mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
79 lines
2.3 KiB
C++
79 lines
2.3 KiB
C++
#ifndef PROVIDERDBLMS_H
|
||
#define PROVIDERDBLMS_H
|
||
|
||
#include <QObject>
|
||
#include <QDebug>
|
||
#include "interfacedatabaselms.h"
|
||
#include "tasksAmmFim.h"
|
||
|
||
class ProviderDBLMS : public QObject
|
||
{
|
||
Q_OBJECT
|
||
public:
|
||
explicit ProviderDBLMS(QWidget *parentWidget, QObject *parent = nullptr);
|
||
~ProviderDBLMS();
|
||
public:
|
||
QString getMainInstructorName();
|
||
|
||
//Авторизация обучаемого на клиенте
|
||
bool authorizationTrainee(QString login, QString password, QString classroom_name = QStringLiteral(""), QString computer_name = QStringLiteral(""));
|
||
bool deAuthorizationTrainee(QString login);
|
||
QString getNameTraineeByLogin(QString login);
|
||
|
||
//Авторизация инструктора на клиенте
|
||
bool authorizationInstructor(QString login, QString password);
|
||
bool deAuthorizationInstructor(QString login);
|
||
QString getNameInstructorByLogin(QString login);
|
||
|
||
//Общая деавторизация
|
||
bool deAuthorizationAll();
|
||
|
||
//
|
||
int getIdTraineeByLogin(QString login);
|
||
QString getLoginTraineeById(int id_trainee);
|
||
|
||
QList<Instructor> GetListAllInstructors();
|
||
QList<Trainee> GetListAllTrainees();
|
||
QList<Group> GetListAllGroups();
|
||
|
||
int newInstructor();
|
||
int delInstructor(int id);
|
||
int editInstructor(Instructor instructor);
|
||
|
||
int newTrainee(int id_group);
|
||
int delTrainee(int id);
|
||
int editTrainee(Trainee trainee);
|
||
|
||
int newGroup();
|
||
int delGroup(int id);
|
||
int editGroup(Group group);
|
||
|
||
int newTaskAMM(TaskAmmFim task, int id_trainee);
|
||
int delTaskAMM(int id);
|
||
int editTaskAMM(TaskAmmFim task);
|
||
int editStatusTaskAMM(int task_id, QString status);
|
||
|
||
int newTaskFIM(TaskAmmFim task, int id_trainee);
|
||
int delTaskFIM(int id);
|
||
int editTaskFIM(TaskAmmFim task);
|
||
int editStatusTaskFIM(int task_id, QString status);
|
||
int replaceReportFIM(TaskAmmFim task);
|
||
|
||
QList<TaskAmmFim> GetListTasksAMMofTrainee(int id_trainee);
|
||
QList<TaskAmmFim> GetListTasksFIMofTrainee(int id_trainee);
|
||
|
||
Q_SIGNALS:
|
||
//сигнал о блокировке авторизации
|
||
void signal_BlockAutorization(bool block);
|
||
|
||
public:
|
||
void ConnectionToDB();
|
||
void DisConnectionFromDB();
|
||
|
||
private:
|
||
InterfaceDataBaseLMS* dbLMS;
|
||
QMutex mtxAccess;
|
||
};
|
||
|
||
#endif // PROVIDERDBLMS_H
|