mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
сделал delInstructor
This commit is contained in:
@@ -74,6 +74,7 @@ void DataParser::xmlParser(ClientHandler *client, QByteArray array)
|
||||
{//Запрос к базе данных от клиента
|
||||
|
||||
ClientQueryToDB queryToDB;
|
||||
int id = 0;
|
||||
|
||||
/*Перебираем все атрибуты тега*/
|
||||
foreach(const QXmlStreamAttribute &attr, xmlReader.attributes())
|
||||
@@ -84,9 +85,11 @@ void DataParser::xmlParser(ClientHandler *client, QByteArray array)
|
||||
|
||||
if(name == "TypeQuery")
|
||||
queryToDB.typeQuery = (TypeQueryToDB)value.toInt();
|
||||
else if(name == "id")
|
||||
id = value.toInt();
|
||||
}
|
||||
|
||||
processingSystem->processingClientQueryToDB(client, queryToDB);
|
||||
processingSystem->processingClientQueryToDB(client, queryToDB, id);
|
||||
}
|
||||
else if(xmlReader.name() == "ClientMessage")
|
||||
{//Сообщение от клиента
|
||||
|
||||
@@ -113,7 +113,7 @@ void ProcessingSystem::processingClientDeAutorization(ClientHandler *client, Cli
|
||||
emit sigAuthChanged();
|
||||
}
|
||||
|
||||
void ProcessingSystem::processingClientQueryToDB(ClientHandler *client, ClientQueryToDB clientQueryToDB)
|
||||
void ProcessingSystem::processingClientQueryToDB(ClientHandler *client, ClientQueryToDB clientQueryToDB, int id)
|
||||
{
|
||||
QByteArray arrayAnswer;
|
||||
|
||||
@@ -147,6 +147,12 @@ void ProcessingSystem::processingClientQueryToDB(ClientHandler *client, ClientQu
|
||||
emit sigAuthChanged();
|
||||
break;
|
||||
}
|
||||
case TypeQueryToDB::TYPE_QUERY_DEL_INSTRUCTOR:
|
||||
{
|
||||
providerDBLMS->delInstructor(id);
|
||||
emit sigAuthChanged();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//client->sendXmlAnswer(arrayAnswer, PacketType::TYPE_XMLANSWER_QUERY_DB_LIST_INSTRUCTORS);
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
void initialize(DataParser* dataParser,ServerLMSWidget *server);
|
||||
void processingClientAutorization(ClientHandler *client, ClientAutorization clientAutorization);
|
||||
void processingClientDeAutorization(ClientHandler *client, ClientDeAutorization clientDeAutorization);
|
||||
void processingClientQueryToDB(ClientHandler *client, ClientQueryToDB clientQueryToDB);
|
||||
void processingClientQueryToDB(ClientHandler *client, ClientQueryToDB clientQueryToDB, int id = 0);
|
||||
void processingClientMessage(ClientHandler *client, ClientMessage clientMessage);
|
||||
void processingClientNotify(ClientHandler *client, ClientNotify clientNotify);
|
||||
|
||||
|
||||
@@ -257,3 +257,8 @@ int ProviderDBLMS::newInstructor()
|
||||
{
|
||||
return dbLMS->newInstructor();
|
||||
}
|
||||
|
||||
int ProviderDBLMS::delInstructor(int id)
|
||||
{
|
||||
return dbLMS->delInstructor(id);
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
QList<Group> GetListAllGroups();
|
||||
|
||||
int newInstructor();
|
||||
int delInstructor(int id);
|
||||
|
||||
Q_SIGNALS:
|
||||
//сигнал о блокировке авторизации
|
||||
|
||||
@@ -59,7 +59,8 @@ public:
|
||||
enum TypeQueryToDB{
|
||||
TYPE_QUERY_GET_LIST_INSTRUCTORS,
|
||||
TYPE_QUERY_GET_ALL_LISTS,
|
||||
TYPE_QUERY_NEW_INSTRUCTOR
|
||||
TYPE_QUERY_NEW_INSTRUCTOR,
|
||||
TYPE_QUERY_DEL_INSTRUCTOR
|
||||
};
|
||||
|
||||
class ClientQueryToDB{
|
||||
|
||||
Reference in New Issue
Block a user