mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Доделал остальные операции по редактированию
This commit is contained in:
@@ -46,7 +46,7 @@ bool ConnectorToServer::deAuthorizationInstructorLocal(QString login)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ConnectorToServer::sendQueryToDB(TypeQueryToDB typeQuery, int id)
|
||||
bool ConnectorToServer::sendQueryToDB(TypeQueryToDB typeQuery, int id, void* data)
|
||||
{
|
||||
if (!client->getIsConnected())
|
||||
{
|
||||
@@ -56,7 +56,7 @@ bool ConnectorToServer::sendQueryToDB(TypeQueryToDB typeQuery, int id)
|
||||
ClientQueryToDB *queryToDB = new ClientQueryToDB;
|
||||
queryToDB->typeQuery = typeQuery;
|
||||
|
||||
dataParser->createQueryToDBMessage(queryToDB, id);
|
||||
dataParser->createQueryToDBMessage(queryToDB, id, data);
|
||||
emit sigSendQueryToDB();
|
||||
|
||||
return true;
|
||||
@@ -128,6 +128,16 @@ bool ConnectorToServer::isLoggedInInstructor(int id)
|
||||
return false;
|
||||
}
|
||||
|
||||
Instructor ConnectorToServer::getInstructor(int id)
|
||||
{
|
||||
for(Instructor instructor : listInstructors)
|
||||
{
|
||||
if(instructor.getID() == id)
|
||||
return instructor;
|
||||
}
|
||||
return Instructor();
|
||||
}
|
||||
|
||||
QList<Trainee> ConnectorToServer::getListTraineesInGroup(int id)
|
||||
{
|
||||
QList<Trainee> list;
|
||||
@@ -163,6 +173,26 @@ bool ConnectorToServer::isLoggedInTrainee(int id)
|
||||
return false;
|
||||
}
|
||||
|
||||
Trainee ConnectorToServer::getTrainee(int id)
|
||||
{
|
||||
for(Trainee trainee : listTrainees)
|
||||
{
|
||||
if(trainee.getID() == id)
|
||||
return trainee;
|
||||
}
|
||||
return Trainee();
|
||||
}
|
||||
|
||||
Group ConnectorToServer::getGroup(int id)
|
||||
{
|
||||
for(Group group : listGroups)
|
||||
{
|
||||
if(group.getID() == id)
|
||||
return group;
|
||||
}
|
||||
return Group();
|
||||
}
|
||||
|
||||
void ConnectorToServer::slot_AnswerQueryToDB(QList<Instructor>* listInstructors,
|
||||
QList<Trainee>* listTrainees,
|
||||
QList<Group>* listGroups)
|
||||
|
||||
Reference in New Issue
Block a user