до изменения NEW_GROUP

This commit is contained in:
krivoshein
2024-12-13 13:22:10 +03:00
parent 14148356e0
commit f58baa7ab9
24 changed files with 199 additions and 108 deletions

View File

@@ -95,6 +95,7 @@ void DataParser::xmlParser(ClientHandler *client, QByteArray array)
{
switch (queryToDB.typeQuery)
{
case TypeQueryToDB::TYPE_QUERY_NEW_INSTRUCTOR:
case TypeQueryToDB::TYPE_QUERY_EDIT_INSTRUCTOR:
if(name == "instructor_id")
instructor.setID(value.toInt());
@@ -147,6 +148,7 @@ void DataParser::xmlParser(ClientHandler *client, QByteArray array)
switch (queryToDB.typeQuery)
{
case TypeQueryToDB::TYPE_QUERY_NEW_INSTRUCTOR:
case TypeQueryToDB::TYPE_QUERY_EDIT_INSTRUCTOR:
data = &instructor;
break;

View File

@@ -143,7 +143,13 @@ void ProcessingSystem::processingClientQueryToDB(ClientHandler *client, ClientQu
}
case TypeQueryToDB::TYPE_QUERY_NEW_INSTRUCTOR:
{
providerDBLMS->newInstructor();
int id;
id = providerDBLMS->newInstructor();
if(id)
{
(*(Instructor*)data).setID(id);
providerDBLMS->editInstructor(*(Instructor*)data);
}
emit sigAuthChanged();
break;
}