mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
verify в EditInstructor
This commit is contained in:
@@ -112,6 +112,7 @@ void DataParser::xmlParser(ClientHandler *client, QByteArray array)
|
||||
else if(name == "logged_in")
|
||||
instructor.setLoggedIn(value.toInt());
|
||||
break;
|
||||
case TypeQueryToDB::TYPE_QUERY_NEW_TRAINEE:
|
||||
case TypeQueryToDB::TYPE_QUERY_EDIT_TRAINEE:
|
||||
if(name == "trainee_id")
|
||||
trainee.setID(value.toInt());
|
||||
@@ -136,6 +137,7 @@ void DataParser::xmlParser(ClientHandler *client, QByteArray array)
|
||||
trainee.setComputer(computer);
|
||||
}
|
||||
break;
|
||||
case TypeQueryToDB::TYPE_QUERY_NEW_GROUP:
|
||||
case TypeQueryToDB::TYPE_QUERY_EDIT_GROUP:
|
||||
if(name == "group_id")
|
||||
group.setID(value.toInt());
|
||||
@@ -152,9 +154,11 @@ void DataParser::xmlParser(ClientHandler *client, QByteArray array)
|
||||
case TypeQueryToDB::TYPE_QUERY_EDIT_INSTRUCTOR:
|
||||
data = &instructor;
|
||||
break;
|
||||
case TypeQueryToDB::TYPE_QUERY_NEW_TRAINEE:
|
||||
case TypeQueryToDB::TYPE_QUERY_EDIT_TRAINEE:
|
||||
data = &trainee;
|
||||
break;
|
||||
case TypeQueryToDB::TYPE_QUERY_NEW_GROUP:
|
||||
case TypeQueryToDB::TYPE_QUERY_EDIT_GROUP:
|
||||
data = &group;
|
||||
break;
|
||||
|
||||
@@ -143,11 +143,11 @@ void ProcessingSystem::processingClientQueryToDB(ClientHandler *client, ClientQu
|
||||
}
|
||||
case TypeQueryToDB::TYPE_QUERY_NEW_INSTRUCTOR:
|
||||
{
|
||||
int id;
|
||||
id = providerDBLMS->newInstructor();
|
||||
if(id)
|
||||
int id_new;
|
||||
id_new = providerDBLMS->newInstructor();
|
||||
if(id_new)
|
||||
{
|
||||
(*(Instructor*)data).setID(id);
|
||||
(*(Instructor*)data).setID(id_new);
|
||||
providerDBLMS->editInstructor(*(Instructor*)data);
|
||||
}
|
||||
emit sigAuthChanged();
|
||||
@@ -168,7 +168,13 @@ void ProcessingSystem::processingClientQueryToDB(ClientHandler *client, ClientQu
|
||||
|
||||
case TypeQueryToDB::TYPE_QUERY_NEW_TRAINEE:
|
||||
{
|
||||
providerDBLMS->newTrainee(id);
|
||||
int id_new;
|
||||
id_new = providerDBLMS->newTrainee(id);
|
||||
if(id_new)
|
||||
{
|
||||
(*(Trainee*)data).setID(id_new);
|
||||
providerDBLMS->editTrainee(*(Trainee*)data);
|
||||
}
|
||||
emit sigAuthChanged();
|
||||
break;
|
||||
}
|
||||
@@ -187,7 +193,13 @@ void ProcessingSystem::processingClientQueryToDB(ClientHandler *client, ClientQu
|
||||
|
||||
case TypeQueryToDB::TYPE_QUERY_NEW_GROUP:
|
||||
{
|
||||
providerDBLMS->newGroup();
|
||||
int id_new;
|
||||
id_new = providerDBLMS->newGroup();
|
||||
if(id_new)
|
||||
{
|
||||
(*(Group*)data).setID(id_new);
|
||||
providerDBLMS->editGroup(*(Group*)data);
|
||||
}
|
||||
emit sigAuthChanged();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user