mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
notifyController убрал
This commit is contained in:
@@ -9,8 +9,7 @@ EditorTrainees::EditorTrainees(ConnectorToServer* connectorToServer, bool adminM
|
||||
TraineesView(connectorToServer, CommonView::TypeView::control, parent),
|
||||
ui(new Ui::EditorTrainees),
|
||||
dlgEditTrainee(nullptr),
|
||||
dlgEditGroup(nullptr),
|
||||
specialMessageBox(nullptr)
|
||||
dlgEditGroup(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@@ -55,8 +54,6 @@ EditorTrainees::~EditorTrainees()
|
||||
dlgEditGroup = nullptr;
|
||||
}
|
||||
|
||||
//SpecMsgBox::CloseAndDelete(specialMessageBox);
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -67,8 +64,6 @@ void EditorTrainees::closeEvent(QCloseEvent *event)
|
||||
|
||||
if(dlgEditGroup)
|
||||
dlgEditGroup->close();
|
||||
|
||||
//SpecMsgBox::CloseAndDelete(specialMessageBox);
|
||||
}
|
||||
|
||||
void EditorTrainees::on_btnNewGroup_clicked()
|
||||
@@ -98,12 +93,12 @@ void EditorTrainees::on_btnDeleteGroup_clicked()
|
||||
|
||||
if(connectorToServer->getListTraineesInGroup(id_group).count() > 0)
|
||||
{
|
||||
SpecMsgBox::CriticalClose(specialMessageBox, this, tr("The group is not empty.\nIt is not possible to delete a non-empty group."));
|
||||
SpecMsgBox::CriticalClose(this, tr("The group is not empty.\nIt is not possible to delete a non-empty group."));
|
||||
return;
|
||||
}
|
||||
else
|
||||
{//Пустая группа
|
||||
if(SpecMsgBox::WarningYesNo(specialMessageBox, this, tr("The deletion will be irrevocable.\nDelete it anyway?")) == QDialog::Accepted)
|
||||
if(SpecMsgBox::WarningYesNo(this, tr("The deletion will be irrevocable.\nDelete it anyway?")) == QDialog::Accepted)
|
||||
{
|
||||
waitAnimationWidget->showWithPlay();
|
||||
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_DEL_GROUP, id_group);
|
||||
@@ -154,11 +149,11 @@ void EditorTrainees::on_btnDeleteTrainee_clicked()
|
||||
|
||||
if(connectorToServer->isLoggedInTrainee(id_trainee))
|
||||
{//Обучаемый залогирован!
|
||||
SpecMsgBox::CriticalClose(specialMessageBox, this, tr("You cannot delete a logged-in trainee."));
|
||||
SpecMsgBox::CriticalClose(this, tr("You cannot delete a logged-in trainee."));
|
||||
return;
|
||||
}
|
||||
|
||||
if(SpecMsgBox::WarningYesNo(specialMessageBox, this, tr("The deletion will be irrevocable.\nDelete it anyway?")) == QDialog::Accepted)
|
||||
if(SpecMsgBox::WarningYesNo(this, tr("The deletion will be irrevocable.\nDelete it anyway?")) == QDialog::Accepted)
|
||||
{
|
||||
waitAnimationWidget->showWithPlay();
|
||||
connectorToServer->sendQueryToDB(TypeQueryToDB::TYPE_QUERY_DEL_TRAINEE, id_trainee);
|
||||
@@ -193,7 +188,7 @@ void EditorTrainees::on_btnToOrFromArchiveTrainee_clicked()
|
||||
{//Не Архивный
|
||||
if(connectorToServer->isLoggedInTrainee(id_trainee))
|
||||
{//Обучаемый залогирован!
|
||||
SpecMsgBox::CriticalClose(specialMessageBox, this, tr("You cannot archive a logged-in trainee."));
|
||||
SpecMsgBox::CriticalClose(this, tr("You cannot archive a logged-in trainee."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -239,7 +234,7 @@ void EditorTrainees::on_btnEdit_clicked()
|
||||
|
||||
if(connectorToServer->isLoggedInTrainee(id_trainee))
|
||||
{//Обучаемый залогирован!
|
||||
SpecMsgBox::CriticalClose(specialMessageBox, this, tr("You cannot edit a logged-in trainee."));
|
||||
SpecMsgBox::CriticalClose(this, tr("You cannot edit a logged-in trainee."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -408,7 +403,7 @@ bool EditorTrainees::verifyGroup(Group group)
|
||||
|
||||
if(group.getName() == QStringLiteral("<group>"))
|
||||
{//Имя не корректно!
|
||||
SpecMsgBox::CriticalClose(specialMessageBox, this, tr("Unacceptable group name has been entered.\nThe changes will not be accepted."));
|
||||
SpecMsgBox::CriticalClose(this, tr("Unacceptable group name has been entered.\nThe changes will not be accepted."));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -418,7 +413,7 @@ bool EditorTrainees::verifyGroup(Group group)
|
||||
{
|
||||
if(group.getName() == exist_group.getName() && group.getID() != exist_group.getID())
|
||||
{//Имя уже существует
|
||||
SpecMsgBox::CriticalClose(specialMessageBox, this, tr("An existing group name has been entered.\nThe changes will not be accepted."));
|
||||
SpecMsgBox::CriticalClose(this, tr("An existing group name has been entered.\nThe changes will not be accepted."));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -432,19 +427,19 @@ bool EditorTrainees::verifyTrainee(Trainee trainee)
|
||||
|
||||
if(trainee.getName() == QStringLiteral("<name>"))
|
||||
{//Имя не корректно!
|
||||
SpecMsgBox::CriticalClose(specialMessageBox, this, tr("Unacceptable trainee name has been entered.\nThe changes will not be accepted."));
|
||||
SpecMsgBox::CriticalClose(this, tr("Unacceptable trainee name has been entered.\nThe changes will not be accepted."));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(trainee.getLogin() == QStringLiteral("<login>"))
|
||||
{//Логин не корректен!
|
||||
SpecMsgBox::CriticalClose(specialMessageBox, this, tr("Unacceptable trainee login has been entered.\nThe changes will not be accepted."));
|
||||
SpecMsgBox::CriticalClose(this, tr("Unacceptable trainee login has been entered.\nThe changes will not be accepted."));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(trainee.getPassword() == QStringLiteral("<password>"))
|
||||
{//Пароль не корректный!
|
||||
SpecMsgBox::CriticalClose(specialMessageBox, this, tr("Unacceptable trainee password has been entered.\nThe changes will not be accepted."));
|
||||
SpecMsgBox::CriticalClose(this, tr("Unacceptable trainee password has been entered.\nThe changes will not be accepted."));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -453,7 +448,7 @@ bool EditorTrainees::verifyTrainee(Trainee trainee)
|
||||
int user_T = connectorToServer->getIdTraineeByLogin(trainee.getLogin());
|
||||
if((user_I && (user_I != trainee.getID())) || (user_T && (user_T != trainee.getID())))
|
||||
{//Логин уже существует!
|
||||
SpecMsgBox::CriticalClose(specialMessageBox, this, tr("An existing instructor or trainee login has been entered.\nThe changes will not be accepted."));
|
||||
SpecMsgBox::CriticalClose(this, tr("An existing instructor or trainee login has been entered.\nThe changes will not be accepted."));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user