Esempio n. 1
0
 BankAccountModelPrivate(BankAccountModel *parent) :
     q(parent)
 {
     _sql = new QSqlTableModel(q, accountBase()->database());
     _sql->setTable(accountBase()->table(Constants::Table_BankDetails));
     _sql->setEditStrategy(QSqlTableModel::OnManualSubmit);
 }
Esempio n. 2
0
 void refreshFeesFromDatabase(const BasicFilter &filter)
 {
     AccountBaseQuery query(filter);
     query.setRetrieveObjects(AccountBaseQuery::Fee);
     AccountBaseResult result = accountBase()->query(query);
     _fees = result.fees();
 }
Esempio n. 3
0
 void refreshFilter(const QString &userUid)
 {
     QHash<int, QString> where;
     if (userUid.isEmpty()) {
         where.insert(Constants::BANKDETAILS_USER_UID, QString("='%1'").arg(user()->uuid()));
     } else {
         if (userUid == "%")
             where.insert(Constants::BANKDETAILS_USER_UID, QString("LIKE '%'"));
         else
             where.insert(Constants::BANKDETAILS_USER_UID, QString("='%1'").arg(userUid));
     }
     _sql->setFilter(accountBase()->getWhereClause(Constants::Table_BankDetails, where));
     _sql->select();
 }