Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 16 → Rev 17

/trunk/source_code/src/addmemoryform.cpp
17,11 → 17,11
QString mnfctSqlText, tmp;
QSqlQuery qproiz;
int field_proizvoditel;
mnfctSqlText = tr("select * from an_db.proizvoditeli_pamyati");
mnfctSqlText = tr("select * from proizvoditeli_pamyati");
// QSqlQuery qns(tr("SET NAMES utf8"));
qproiz.prepare(mnfctSqlText);
qproiz.exec();
// QSqlQuery qproiz("SELECT * FROM an_db.Ïðîèçâîäèòåëè_ïàìÿòè");
// QSqlQuery qproiz("SELECT * FROM Ïðîèçâîäèòåëè_ïàìÿòè");
field_proizvoditel = qproiz.record().indexOf(tr("Ïðîèçâîäèòåëü"));
mnfctrlist.clear();
while (qproiz.next()){
39,11 → 39,11
QString mnfctSqlText, tmp;
QSqlQuery qproiz;
int field_proizvoditel;
mnfctSqlText = tr("select * from an_db.proizvoditeli_video");
mnfctSqlText = tr("select * from proizvoditeli_video");
// QSqlQuery qns(tr("SET NAMES utf8"));
qproiz.prepare(mnfctSqlText);
qproiz.exec();
// QSqlQuery qproiz("SELECT * FROM an_db.Ïðîèçâîäèòåëè_ïàìÿòè");
// QSqlQuery qproiz("SELECT * FROM Ïðîèçâîäèòåëè_ïàìÿòè");
field_proizvoditel = qproiz.record().indexOf(tr("Ïðîèçâîäèòåëü"));
mnfctrlist.clear();
while (qproiz.next()){
63,11 → 63,11
QString mnfctSqlText, tmp;
QSqlQuery qproiz;
int field_proizvoditel;
mnfctSqlText = tr("select * from an_db.proizvoditeli_mb");
mnfctSqlText = tr("select * from proizvoditeli_mb");
// QSqlQuery qns(tr("SET NAMES utf8"));
qproiz.prepare(mnfctSqlText);
qproiz.exec();
// QSqlQuery qproiz("SELECT * FROM an_db.Ïðîèçâîäèòåëè_ïàìÿòè");
// QSqlQuery qproiz("SELECT * FROM Ïðîèçâîäèòåëè_ïàìÿòè");
field_proizvoditel = qproiz.record().indexOf(tr("Ïðîèçâîäèòåëü"));
mnfctrlist.clear();
while (qproiz.next()){
85,11 → 85,11
QString mnfctSqlText, tmp;
QSqlQuery qproiz;
int field_proizvoditel;
mnfctSqlText = tr("select * from an_db.proizvoditeli_hdd");
mnfctSqlText = tr("select * from proizvoditeli_hdd");
// QSqlQuery qns(tr("SET NAMES utf8"));
qproiz.prepare(mnfctSqlText);
qproiz.exec();
// QSqlQuery qproiz("SELECT * FROM an_db.Ïðîèçâîäèòåëè_ïàìÿòè");
// QSqlQuery qproiz("SELECT * FROM Ïðîèçâîäèòåëè_ïàìÿòè");
field_proizvoditel = qproiz.record().indexOf(tr("Ïðîèçâîäèòåëü"));
mnfctrlist.clear();
while (qproiz.next()){
106,11 → 106,11
QString mnfctSqlText, tmp;
QSqlQuery qproiz;
int field_proizvoditel;
mnfctSqlText = tr("select * from an_db.proizvoditeli_cpu");
mnfctSqlText = tr("select * from proizvoditeli_cpu");
// QSqlQuery qns(tr("SET NAMES utf8"));
qproiz.prepare(mnfctSqlText);
qproiz.exec();
// QSqlQuery qproiz("SELECT * FROM an_db.Ïðîèçâîäèòåëè_ïàìÿòè");
// QSqlQuery qproiz("SELECT * FROM Ïðîèçâîäèòåëè_ïàìÿòè");
field_proizvoditel = qproiz.record().indexOf(tr("Ïðîèçâîäèòåëü"));
mnfctrlist.clear();
while (qproiz.next()){
129,7 → 129,7
QString SqlText, tmp;
QSqlQuery qmodel;
int field_model;
SqlText = tr("select * from an_db.Ìîäåëè_ìàòåðèíñêèõ_ïëàò where an_db.Ìîäåëè_ìàòåðèíñêèõ_ïëàò.Ïðîèçâîäèòåëü = \"");
SqlText = tr("select * from Ìîäåëè_ìàòåðèíñêèõ_ïëàò where Ìîäåëè_ìàòåðèíñêèõ_ïëàò.Ïðîèçâîäèòåëü = \"");
SqlText.append(proizvoditel);
SqlText.append(tr("\""));
qmodel.prepare(SqlText);
152,7 → 152,7
QString SqlText, tmp;
QSqlQuery qmodel;
int field_model;
SqlText = tr("select * from an_db.video_models where an_db.video_models.Ïðîèçâîäèòåëü = \"");
SqlText = tr("select * from video_models where video_models.Ïðîèçâîäèòåëü = \"");
SqlText.append(proizvoditel);
SqlText.append(tr("\""));
qmodel.prepare(SqlText);
175,7 → 175,7
QString SqlText, tmp;
QSqlQuery qmodel;
int field_model;
SqlText = tr("select * from an_db.processor_models where an_db.processor_models.Ïðîèçâîäèòåëü = \"");
SqlText = tr("select * from processor_models where processor_models.Ïðîèçâîäèòåëü = \"");
SqlText.append(proizvoditel);
SqlText.append(tr("\""));
qmodel.prepare(SqlText);
197,7 → 197,7
bool b1, b2;
QString tmp, SerialNum, InventarNum, DataPokypki, SrokGarantii, UserId, Identifikator;
int field_identifikator, field_serial_num, field_inventar_num, field_data_pokypki, field_srok_garantii, field_user_id;
QSqlQuery qysBlockList(tr("select * from an_db.system_blocks"));
QSqlQuery qysBlockList(tr("select * from system_blocks"));
field_serial_num = qysBlockList.record().indexOf(tr("Ñåðèéíûé_íîìåð"));
field_inventar_num = qysBlockList.record().indexOf(tr("Èíâåíòàðíûé_íîìåð"));
field_data_pokypki = qysBlockList.record().indexOf(tr("Äàòà_ïîêóïêè"));
237,7 → 237,7
QString identifikator_polzovatela, fio_polzovatela, identifikator_otdela;
int field_identifikator, field_fio, field_id_otdela;
QSqlQuery qSqlUserInfo;
sqlQueryText = tr("select * from an_db.Ñîòðóäíèêè where Èäåíòèôèêàòîð = ");
sqlQueryText = tr("select * from Ñîòðóäíèêè where Èäåíòèôèêàòîð = ");
sqlQueryText.append(userID);
qSqlUserInfo.prepare(sqlQueryText);
qSqlUserInfo.exec();
266,7 → 266,7
QString otdel, sqlText, tmp;
QSqlQuery query;
int field_name;
sqlText = (tr("select an_db.Îòäåëû.Íàçâàíèå from an_db.Îòäåëû where Èäåíòèôèêàòîð = "));
sqlText = (tr("select Îòäåëû.Íàçâàíèå from Îòäåëû where Èäåíòèôèêàòîð = "));
sqlText.append(otdelID);
query.prepare(sqlText);
query.exec();