Доделал остальные операции по редактированию

This commit is contained in:
krivoshein
2024-12-12 10:27:18 +03:00
parent 1569df7d94
commit d28453440f
56 changed files with 725 additions and 540 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.1, 2024-12-10T17:52:46. -->
<!-- Written by QtCreator 4.11.1, 2024-12-11T17:49:41. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@@ -20,12 +20,12 @@ bool InterfaceDataBaseLMS::ConnectionToDB()
{
if(!createConnection())
{
QMessageBox::critical(this, dbName, tr("Connection error: ") + db->lastError().text());
QMessageBox::critical(nullptr, dbName, tr("Connection error: ") + db->lastError().text());
return false;
}
else
{
//QMessageBox::information(this, dbName, tr("Connection is successful!"));
//QMessageBox::information(nullptr, dbName, tr("Connection is successful!"));
return true;
}
}
@@ -33,7 +33,7 @@ bool InterfaceDataBaseLMS::ConnectionToDB()
bool InterfaceDataBaseLMS::DisConnectionFromDB()
{
deleteConnection();
//QMessageBox::information(this, dbName, tr("Disconnection is successful!"));
//QMessageBox::information(nullptr, dbName, tr("Disconnection is successful!"));
return true;
}
@@ -112,35 +112,35 @@ int InterfaceDataBaseLMS::editInstructor(Instructor instructor)
{
if(instructor.getName() == QStringLiteral("<instructor>"))
{//Имя не корректно!
QMessageBox::critical(this, tr("Editing error!"),
QMessageBox::critical(nullptr, tr("Editing error!"),
tr("Unacceptable instructor name has been entered.\nThe changes will not be accepted."));
return 0;
}
if(instructor.getLogin() == QStringLiteral("<login>"))
{//Логин не корректен!
QMessageBox::critical(this, tr("Editing error!"),
QMessageBox::critical(nullptr, tr("Editing error!"),
tr("Unacceptable instructor login has been entered.\nThe changes will not be accepted."));
return 0;
}
if(instructor.getPassword() == QStringLiteral("<password>"))
{//Пароль не корректный!
QMessageBox::critical(this, tr("Editing error!"),
QMessageBox::critical(nullptr, tr("Editing error!"),
tr("Unacceptable instructor password has been entered.\nThe changes will not be accepted."));
return 0;
}
if(instructor.getName() == exist_instructor.getName() && instructor.getID() != exist_instructor.getID())
{//Имя уже существует
QMessageBox::critical(this, tr("Editing error!"),
QMessageBox::critical(nullptr, tr("Editing error!"),
tr("An existing instructor name has been entered."));
return 0;
}
if(instructor.getLogin() == exist_instructor.getLogin() && instructor.getID() != exist_instructor.getID())
{//Логин уже существует!
QMessageBox::critical(this, tr("Editing error!"),
QMessageBox::critical(nullptr, tr("Editing error!"),
tr("An existing instructor login has been entered.\nThe changes will not be accepted."));
return 0;
}
@@ -265,14 +265,14 @@ int InterfaceDataBaseLMS::editGroup(Group group)
{
if(group.getName() == QStringLiteral("<group>"))
{//Имя не корректно!
QMessageBox::critical(this, tr("Editing error!"),
QMessageBox::critical(nullptr, tr("Editing error!"),
tr("Unacceptable group name has been entered.\nThe changes will not be accepted."));
return 0;
}
if(group.getName() == exist_group.getName() && group.getID() != exist_group.getID())
{//Имя уже существует
QMessageBox::critical(this, tr("Editing error!"),
QMessageBox::critical(nullptr, tr("Editing error!"),
tr("An existing group name has been entered.\nThe changes will not be accepted."));
return 0;
}
@@ -299,35 +299,35 @@ int InterfaceDataBaseLMS::editTrainee(Trainee trainee)
{
if(trainee.getName() == QStringLiteral("<trainee>"))
{//Имя не корректно!
QMessageBox::critical(this, tr("Editing error!"),
QMessageBox::critical(nullptr, tr("Editing error!"),
tr("Unacceptable trainee name has been entered.\nThe changes will not be accepted."));
return 0;
}
if(trainee.getLogin() == QStringLiteral("<login>"))
{//Логин не корректен!
QMessageBox::critical(this, tr("Editing error!"),
QMessageBox::critical(nullptr, tr("Editing error!"),
tr("Unacceptable trainee login has been entered.\nThe changes will not be accepted."));
return 0;
}
if(trainee.getPassword() == QStringLiteral("<password>"))
{//Пароль не корректный!
QMessageBox::critical(this, tr("Editing error!"),
QMessageBox::critical(nullptr, tr("Editing error!"),
tr("Unacceptable trainee password has been entered.\nThe changes will not be accepted."));
return 0;
}
if(trainee.getName() == exist_trainee.getName() && trainee.getID() != exist_trainee.getID())
{//Имя уже существует
QMessageBox::critical(this, tr("Editing error!"),
QMessageBox::critical(nullptr, tr("Editing error!"),
tr("An existing trainee name has been entered."));
return 0;
}
if(trainee.getLogin() == exist_trainee.getLogin() && trainee.getID() != exist_trainee.getID())
{//Логин уже существует!
QMessageBox::critical(this, tr("Editing error!"),
QMessageBox::critical(nullptr, tr("Editing error!"),
tr("An existing trainee login has been entered.\nThe changes will not be accepted."));
return 0;
}

View File

@@ -1,20 +1,20 @@
# ninja log v5
35 42 0 clean 9c4b4372737ab8da
2551 2753 7548372846394482 libDataBaseLMS.dll.a 31a19f1f3436f66b
62 112 0 D:/LMS/DB_LMS/Debug64/CMakeFiles/DataBaseLMS_autogen b8e538c54fdbce20
376 935 7548372828213965 CMakeFiles/DataBaseLMS.dir/task.cpp.obj b003a0cb68c6b2bb
365 969 7548372828557079 CMakeFiles/DataBaseLMS.dir/instructor.cpp.obj fb68571e9d220198
370 1041 7548372829285730 CMakeFiles/DataBaseLMS.dir/group.cpp.obj 70fefc8893e4cb77
367 1136 7548372830244717 CMakeFiles/DataBaseLMS.dir/trainee.cpp.obj 4ac35fd8ef58e9f
379 1018 7548372829057639 CMakeFiles/DataBaseLMS.dir/classroom.cpp.obj e9b501dc7cb3286a
62 112 0 DataBaseLMS_autogen/mocs_compilation.cpp b8e538c54fdbce20
362 962 7548372828495057 CMakeFiles/DataBaseLMS.dir/user.cpp.obj 4ee7a17d2a43f188
62 112 0 CMakeFiles/DataBaseLMS_autogen b8e538c54fdbce20
2551 2753 7548372846394482 libDataBaseLMS.dll 31a19f1f3436f66b
352 1488 7548372833764680 CMakeFiles/DataBaseLMS.dir/DataBaseLMS_autogen/mocs_compilation.cpp.obj d9dc0a262f9d4ccd
355 2551 7548372844375223 CMakeFiles/DataBaseLMS.dir/databaselms.cpp.obj 202016fcb2dffc59
373 1015 7548372829016458 CMakeFiles/DataBaseLMS.dir/computer.cpp.obj 5930684a0b27a14f
357 1570 7548372834575382 CMakeFiles/DataBaseLMS.dir/interfacedatabaselms.cpp.obj d76eac97fda56f5b
10 35 0 CMakeFiles/clean.additional 7155004b3956b606
62 112 0 D:/LMS/DB_LMS/Debug64/DataBaseLMS_autogen/mocs_compilation.cpp b8e538c54fdbce20
357 1570 7548372834575382 CMakeFiles/DataBaseLMS.dir/interfacedatabaselms.cpp.obj d76eac97fda56f5b
359 1006 7548372828926693 CMakeFiles/DataBaseLMS.dir/basicentity.cpp.obj 99b734c728959a94
365 969 7548372828557079 CMakeFiles/DataBaseLMS.dir/instructor.cpp.obj fb68571e9d220198
376 935 7548372828213965 CMakeFiles/DataBaseLMS.dir/task.cpp.obj b003a0cb68c6b2bb
62 112 0 D:/LMS/DB_LMS/Debug64/CMakeFiles/DataBaseLMS_autogen b8e538c54fdbce20
2551 2753 7548372846394482 libDataBaseLMS.dll.a 31a19f1f3436f66b
35 42 0 clean 9c4b4372737ab8da
62 112 0 CMakeFiles/DataBaseLMS_autogen b8e538c54fdbce20
362 962 7548372828495057 CMakeFiles/DataBaseLMS.dir/user.cpp.obj 4ee7a17d2a43f188
62 112 0 DataBaseLMS_autogen/mocs_compilation.cpp b8e538c54fdbce20
379 1018 7548372829057639 CMakeFiles/DataBaseLMS.dir/classroom.cpp.obj e9b501dc7cb3286a
367 1136 7548372830244717 CMakeFiles/DataBaseLMS.dir/trainee.cpp.obj 4ac35fd8ef58e9f
370 1041 7548372829285730 CMakeFiles/DataBaseLMS.dir/group.cpp.obj 70fefc8893e4cb77
62 112 0 D:/LMS/DB_LMS/Debug64/DataBaseLMS_autogen/mocs_compilation.cpp b8e538c54fdbce20