void ItemLineEdit::sSearch(ParameterList params) { disconnect(this, SIGNAL(editingFinished()), this, SLOT(sParse())); params.append("item_id", _id); if (queryUsed()) params.append("sql", _sql); else params.append("itemType", _type); if (!_extraClauses.isEmpty()) params.append("extraClauses", _extraClauses); itemSearch* newdlg = searchFactory(); QString stripped = text().trimmed(); if(stripped.length()) { XSqlQuery numQ; numQ.prepare(_query + _numClause + (_extraClause.isEmpty() || !_strict ? "" : " AND " + _extraClause) + QString("ORDER BY %1;").arg(_numColName)); numQ.bindValue(":number", "^" + stripped); numQ.exec(); if (numQ.first()) newdlg->setQuery(numQ); } newdlg->setSearchText(text()); int id; if ((id = newdlg->exec()) != QDialog::Rejected) setId(id); connect(this, SIGNAL(editingFinished()), this, SLOT(sParse())); }
void VirtualClusterLineEdit::sSearch() { disconnect(this, SIGNAL(editingFinished()), this, SLOT(sParse())); VirtualSearch* newdlg = searchFactory(); if (newdlg) { QString stripped = text().trimmed(); if(stripped.length()) { XSqlQuery numQ; numQ.prepare(_query + _numClause + (_extraClause.isEmpty() || !_strict ? "" : " AND " + _extraClause) + ((_hasActive && ! _showInactive) ? _activeClause : "" ) + QString("ORDER BY %1;").arg(_numColName)); numQ.bindValue(":number", "^" + stripped); numQ.exec(); if (numQ.first()) newdlg->setQuery(numQ); } newdlg->setSearchText(text()); int id = newdlg->exec(); setId(id); } else QMessageBox::critical(this, tr("A System Error Occurred at %1::%2.") .arg(__FILE__) .arg(__LINE__), tr("%1::sSearch() not yet defined").arg(objectName())); connect(this, SIGNAL(editingFinished()), this, SLOT(sParse())); }
void WoLineEdit::sSearch() { disconnect(this, SIGNAL(editingFinished()), this, SLOT(sParse())); woSearch* newdlg = searchFactory(); if (newdlg) { ParameterList params; params.append("wo_id", _id); params.append("woType", _woType); if (_warehouseid != -1) params.append("warehous_id", _warehouseid); newdlg->set(params); int id = newdlg->exec(); setId(id); } else QMessageBox::critical(this, tr("A System Error Occurred at %1::%2.") .arg(__FILE__) .arg(__LINE__), tr("%1::sList() not yet defined") .arg(metaObject()->className())); connect(this, SIGNAL(editingFinished()), this, SLOT(sParse())); }
void VirtualClusterLineEdit::sSearch() { VirtualSearch* newdlg = searchFactory(); if (newdlg) { int id = newdlg->exec(); setId(id); } else QMessageBox::critical(this, tr("A System Error Occurred at %1::%2.") .arg(__FILE__) .arg(__LINE__), tr("%1::sSearch() not yet defined").arg(className())); }
void ContactClusterLineEdit::sSearch() { ContactSearch* newdlg = searchFactory(); if (newdlg) { ParameterList params; if (_searchAcctId != -1) params.append("searchAcctId", _searchAcctId); newdlg->set(params); int id = newdlg->exec(); setId(id); } else QMessageBox::critical(this, tr("A System Error Occurred at %1::%2.") .arg(__FILE__) .arg(__LINE__), tr("Could not instantiate a Search Dialog")); }
void ShiptoEdit::sSearch() { disconnect(this, SIGNAL(editingFinished()), this, SLOT(sParse())); shipToSearch* newdlg = searchFactory(); if (newdlg) { ParameterList params; params.append("cust_id", _custid); newdlg->set(params); newdlg->setSearchText(text()); int id = newdlg->exec(); setId(id); } else QMessageBox::critical(this, tr("A System Error Occurred at %1::%2.") .arg(__FILE__) .arg(__LINE__), tr("%1::sSearch() not yet defined") .arg(metaObject()->className())); connect(this, SIGNAL(editingFinished()), this, SLOT(sParse())); }