ptrProductionMapper->setModel(ptrProductionModel);
// Setup the production table
ptrProductionModel->setTable("prod_lotto");
ptrProductionModel->setSort(lot_number, Qt::AscendingOrder);
ptrProductionModel->setHeaderData(lot_id, Qt::Horizontal, tr("Lot id"));
ptrProductionModel->setHeaderData(lot, Qt::Horizontal, tr("Lot"));
ptrProductionModel->setHeaderData(lot_model, Qt::Horizontal, tr("Lot model"));
ptrProductionModel->setHeaderData(lot_number, Qt::Horizontal, tr("Lot number"));
ptrProductionModel->setHeaderData(customer, Qt::Horizontal, tr("Customer"));
ptrProductionModel->setHeaderData(order_date, Qt::Horizontal, "Order date");
ptrProductionModel->setHeaderData(site, Qt::Horizontal, tr("Site"));
ptrProductionModel->setHeaderData(guarantee_start, Qt::Horizontal, tr("Guarantee start"));
ptrProductionModel->setHeaderData(cabinet_model, Qt::Horizontal, tr("Cabinet model"));
ptrProductionModel->setHeaderData(front_model, Qt::Horizontal, tr("Front model"));
ptrProductionModel->setHeaderData(lot_id, Qt::Horizontal, tr("Lot id"));
ptrProductionModel->setHeaderData(banknote_reader, Qt::Horizontal, tr("Banknote reader"));
ptrProductionModel->setHeaderData(banknote_reader_num, Qt::Horizontal, tr("Banknote reader num."));
ptrProductionModel->setHeaderData(money_reader, Qt::Horizontal, tr("Money reader"));
ptrProductionModel->setHeaderData(money_reader_num, Qt::Horizontal, tr("Money reader num."));
ptrProductionModel->setHeaderData(hopper, Qt::Horizontal, tr("Hopper"));
ptrProductionModel->setHeaderData(hopper_num, Qt::Horizontal, tr("Hopper num."));
ptrProductionModel->setHeaderData(card_dispenser, Qt::Horizontal, tr("Card dispenser"));
ptrProductionModel->setHeaderData(card_dispenser_num, Qt::Horizontal, tr("Card dispenser num."));
ptrProductionModel->setHeaderData(card_system_model, Qt::Horizontal, tr("Card system model"));
ptrProductionModel->setHeaderData(card_system_model_num, Qt::Horizontal, tr("Card system model num."));
ptrProductionModel->setHeaderData(code_card, Qt::Horizontal, tr("Code card"));
ptrProductionModel->setHeaderData(card_release, Qt::Horizontal, tr("Card release"));
ptrProductionModel->setHeaderData(card_release_num, Qt::Horizontal, tr("Card release num."));
ptrProductionModel->setHeaderData(test_date, Qt::Horizontal, tr("Test date"));
ptrProductionModel->setHeaderData(tester, Qt::Horizontal, tr("Tester"));
ptrProductionModel->setHeaderData(notes, Qt::Horizontal, tr("Notes"));
ptrProductionModel->setHeaderData(active_flag, Qt::Horizontal, tr("Active flag"));
ptrProductionModel->setFilter("FLAG_ATTIVO = 1");
ptrProductionModel->select();
ptrProductionModel = new QSqlTableModel(this, currentConnection);
ptrProductionMapper = new QDataWidgetMapper(this);
ptrProductionModel->setEditStrategy(QSqlTableModel::OnManualSubmit);
ptrProductionMapper->setModel(ptrProductionModel);
// Setup the production table
ptrProductionModel->setTable("prod_lotto");
ptrProductionModel->setSort(lot_number, Qt::AscendingOrder);
ptrProductionModel->setHeaderData(lot_id, Qt::Horizontal, tr("Lot id"));
ptrProductionModel->setHeaderData(lot, Qt::Horizontal, tr("Lot"));
ptrProductionModel->setHeaderData(lot_model, Qt::Horizontal, tr("Lot model"));
ptrProductionModel->setHeaderData(lot_number, Qt::Horizontal, tr("Lot number"));
ptrProductionModel->setHeaderData(customer, Qt::Horizontal, tr("Customer"));
ptrProductionModel->setHeaderData(order_date, Qt::Horizontal, "Order date");
ptrProductionModel->setHeaderData(site, Qt::Horizontal, tr("Site"));
ptrProductionModel->setHeaderData(guarantee_start, Qt::Horizontal, tr("Guarantee start"));
ptrProductionModel->setHeaderData(cabinet_model, Qt::Horizontal, tr("Cabinet model"));
ptrProductionModel->setHeaderData(front_model, Qt::Horizontal, tr("Front model"));
ptrProductionModel->setHeaderData(lot_id, Qt::Horizontal, tr("Lot id"));
ptrProductionModel->setHeaderData(banknote_reader, Qt::Horizontal, tr("Banknote reader"));
ptrProductionModel->setHeaderData(banknote_reader_num, Qt::Horizontal, tr("Banknote reader num."));
ptrProductionModel->setHeaderData(money_reader, Qt::Horizontal, tr("Money reader"));
ptrProductionModel->setHeaderData(money_reader_num, Qt::Horizontal, tr("Money reader num."));
ptrProductionModel->setHeaderData(hopper, Qt::Horizontal, tr("Hopper"));
ptrProductionModel->setHeaderData(hopper_num, Qt::Horizontal, tr("Hopper num."));
ptrProductionModel->setHeaderData(card_dispenser, Qt::Horizontal, tr("Card dispenser"));
ptrProductionModel->setHeaderData(card_dispenser_num, Qt::Horizontal, tr("Card dispenser num."));
ptrProductionModel->setHeaderData(card_system_model, Qt::Horizontal, tr("Card system model"));
ptrProductionModel->setHeaderData(card_system_model_num, Qt::Horizontal, tr("Card system model num."));
ptrProductionModel->setHeaderData(code_card, Qt::Horizontal, tr("Code card"));
ptrProductionModel->setHeaderData(card_release, Qt::Horizontal, tr("Card release"));
ptrProductionModel->setHeaderData(card_release_num, Qt::Horizontal, tr("Card release num."));
ptrProductionModel->setHeaderData(test_date, Qt::Horizontal, tr("Test date"));
ptrProductionModel->setHeaderData(tester, Qt::Horizontal, tr("Tester"));
ptrProductionModel->setHeaderData(notes, Qt::Horizontal, tr("Notes"));
ptrProductionModel->setHeaderData(active_flag, Qt::Horizontal, tr("Active flag"));
ptrProductionModel->setFilter("FLAG_ATTIVO = 1");
ptrProductionModel->select();
To copy to clipboard, switch view to plain text mode
Bookmarks