mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-29 20:05:38 +03:00
сделал delInstructor
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
//Запросы к БД (локальной)
|
||||
|
||||
Reference in New Issue
Block a user