void TCustomer::testGroupId () { Customer c; c.setGroupId (tGroup); QVERIFY (c.getGroupId () == tGroup); }
void MainWindow::on_SaveCustomer_clicked() { if("" == ui->FindName->text() || "" == ui->FindSurname->text() || "" == ui->FindGroupID->text()) { QMessageBox::about(0,Title,NotAllCustomerData); ui->FindName->setFocus(); } else { Customer customer; customer.setId( ui->FindID->text() ); customer.setName( ui->FindName->text()); customer.setSurname( ui->FindSurname->text()); customer.setGroupId( ui->FindGroupID->text().toInt()); CM.editCustomer(customer); ui->FindID->setText(""); ui->FindGroupID->setText(""); ui->FindName->setText(""); ui->FindSurname->setText(""); ui->FindID->setFocus(); CustomerTableView(); } }