mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
57 lines
1.2 KiB
C++
57 lines
1.2 KiB
C++
#ifndef DATABASEINSTRUCTORS_H
|
|
#define DATABASEINSTRUCTORS_H
|
|
|
|
#include <QList>
|
|
#include <QObject>
|
|
#include "instructorsAndTrainees_global.h"
|
|
#include "instructor.h"
|
|
|
|
#include "databaselms.h"
|
|
|
|
|
|
class DataBaseInstructors : QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
DataBaseInstructors(DataBaseLMS* dbLMS);
|
|
~DataBaseInstructors();
|
|
|
|
void LoadInstructorsPSQL();
|
|
|
|
bool AuthorizationInstructor(QString login, QString password);
|
|
bool deAuthorizationInstructor(QString login);
|
|
|
|
QList<Instructor> getListInstructors(){ return listOfInstructors; } //Для загрузки
|
|
|
|
Instructor getInstructor(int id);
|
|
|
|
QString getNameInstructorByLogin(QString login);
|
|
|
|
//QString getAuthorizedInstructorName();
|
|
|
|
int newInstructor();
|
|
int deleteInstructor(int id);
|
|
int editInstructor(Instructor instructor);
|
|
|
|
bool isAdmin(int id);
|
|
bool isArchived(int id);
|
|
|
|
|
|
private:
|
|
QString generateDefaultNameInstructor();
|
|
bool checkExistNameInstructor(QString name);
|
|
|
|
QString generateDefaultLoginInstructor();
|
|
bool checkExistLoginInstructor(QString login);
|
|
|
|
private:
|
|
QList<Instructor> listOfInstructors;
|
|
|
|
bool adminMode;
|
|
|
|
DataBaseLMS* dbLMS;
|
|
};
|
|
|
|
#endif // DATABASEINSTRUCTORS_H
|