сделал delInstructor

This commit is contained in:
krivoshein
2024-12-11 14:24:50 +03:00
parent 0cb03e49b1
commit 1569df7d94
43 changed files with 302 additions and 320 deletions

View File

@@ -71,7 +71,7 @@ void DataParser::createAuthMessage(ClientAutorization *auth)
file.close();
}
void DataParser::createQueryToDBMessage(ClientQueryToDB *queryToDB)
void DataParser::createQueryToDBMessage(ClientQueryToDB *queryToDB, int id)
{
QFile file(tempName);
file.open(QIODevice::WriteOnly);
@@ -83,6 +83,9 @@ void DataParser::createQueryToDBMessage(ClientQueryToDB *queryToDB)
xmlWriter.writeAttribute("TypeQuery", QString::number(queryToDB->typeQuery));
if(id)
xmlWriter.writeAttribute("id", QString::number(id));
xmlWriter.writeEndElement();
xmlWriter.writeEndElement();
xmlWriter.writeEndDocument();

View File

@@ -21,7 +21,7 @@ public:
void saveClientSettrings(QString language,bool isAutoStart);
void createFileDataList(QList<FileData> fileDataList,QString filename);
void createAuthMessage(ClientAutorization *auth);
void createQueryToDBMessage(ClientQueryToDB *queryToDB);
void createQueryToDBMessage(ClientQueryToDB *queryToDB, int id = 0);
void createDeAuthMessage(ClientDeAutorization *deAuth);
void createAuthData(ServerAuthorization *serverAuth);
void createAuthDataOffline(QString username,QString pass);

View File

@@ -45,7 +45,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{

View File

@@ -46,7 +46,7 @@ bool ConnectorToServer::deAuthorizationInstructorLocal(QString login)
return true;
}
bool ConnectorToServer::sendQueryToDB(TypeQueryToDB typeQuery)
bool ConnectorToServer::sendQueryToDB(TypeQueryToDB typeQuery, int id)
{
if (!client->getIsConnected())
{
@@ -56,7 +56,7 @@ bool ConnectorToServer::sendQueryToDB(TypeQueryToDB typeQuery)
ClientQueryToDB *queryToDB = new ClientQueryToDB;
queryToDB->typeQuery = typeQuery;
dataParser->createQueryToDBMessage(queryToDB);
dataParser->createQueryToDBMessage(queryToDB, id);
emit sigSendQueryToDB();
return true;

View File

@@ -22,7 +22,7 @@ public:
bool authorizationInstructorLocal(QString login, QString password);
bool deAuthorizationInstructorLocal(QString login);
bool sendQueryToDB(TypeQueryToDB typeQuery);
bool sendQueryToDB(TypeQueryToDB typeQuery, int id = 0);
public:
//Запросы к БД (локальной)