|
|
@ -57,8 +57,7 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
connect(m_form, &IForm::recordAdded, [this](){
|
|
|
|
connect(m_form, &IForm::recordAdded, [this](){
|
|
|
|
//service()->save(form()->entity());
|
|
|
|
//service()->save(form()->entity());
|
|
|
|
m_tableModel->addRow(form()->entity());
|
|
|
|
addRow(form()->entity());
|
|
|
|
emit dataChanged();
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
connect(m_form, &IForm::recordUpdated, [this](){
|
|
|
|
connect(m_form, &IForm::recordUpdated, [this](){
|
|
|
|
//service()->update(form()->entity());
|
|
|
|
//service()->update(form()->entity());
|
|
|
@ -224,6 +223,12 @@ protected:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void addRow(QSharedPointer<T> entity)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
m_tableModel->addRow(entity);
|
|
|
|
|
|
|
|
emit dataChanged();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void showImportButton()
|
|
|
|
void showImportButton()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QHBoxLayout *tbLayout = qobject_cast<QHBoxLayout*>(this->toolbar()->layout());
|
|
|
|
QHBoxLayout *tbLayout = qobject_cast<QHBoxLayout*>(this->toolbar()->layout());
|
|
|
|