void TCustomer::testSurname () { Customer c; c.setSurname (tSurname); QVERIFY (c.getSurname () == tSurname); }
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(); } }