mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
after interface 13.11.2024
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include <QHeaderView>
|
||||
#include "traineesview.h"
|
||||
|
||||
TraineesView::TraineesView(DataBaseTrainees* dbTrainees, TypeView type, bool adminMode, QWidget *parent):
|
||||
TraineesView::TraineesView(InterfaceDataBaseLMS* dbLMS, TypeView type, bool adminMode, QWidget *parent):
|
||||
CommonView(type, adminMode, parent),
|
||||
dbTrainees(dbTrainees)
|
||||
dbLMS(dbLMS)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -57,16 +57,18 @@ void TraineesView::preparationTreeWidget(QTreeWidget *tree)
|
||||
}
|
||||
}
|
||||
|
||||
treeWidget->setSortingEnabled(true);
|
||||
treeWidget->sortItems(ColumnsTreeTrainees::clmn_Trainee, Qt::SortOrder::AscendingOrder);
|
||||
}
|
||||
|
||||
void TraineesView::loadTraineesFromDB()
|
||||
{
|
||||
QList <Group> listGroups;
|
||||
QList <Trainee> listTrainees;
|
||||
dbTrainees->transactionBegin();
|
||||
listGroups = dbTrainees->getListGroups();
|
||||
listTrainees = dbTrainees->getListTrainees();
|
||||
dbTrainees->transactionEnd();
|
||||
//dbTrainees->transactionBegin();
|
||||
listGroups = dbLMS->getListGroups();
|
||||
listTrainees = dbLMS->getListTrainees();
|
||||
//dbTrainees->transactionEnd();
|
||||
|
||||
if(treeWidget == nullptr)
|
||||
return;
|
||||
@@ -147,8 +149,6 @@ void TraineesView::loadTraineesFromDB()
|
||||
}
|
||||
}
|
||||
|
||||
treeWidget->setSortingEnabled(true);
|
||||
treeWidget->sortItems(ColumnsTreeTrainees::clmn_Trainee, Qt::SortOrder::AscendingOrder);
|
||||
treeWidget->expandAll();
|
||||
|
||||
if(typeView == TypeView::control)
|
||||
|
||||
Reference in New Issue
Block a user