本文整理汇总了C++中Customer::getUserName方法的典型用法代码示例。如果您正苦于以下问题:C++ Customer::getUserName方法的具体用法?C++ Customer::getUserName怎么用?C++ Customer::getUserName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customer
的用法示例。
在下文中一共展示了Customer::getUserName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_pushButton_RequestBrochure_clicked
void MainProgramWindow::on_pushButton_RequestBrochure_clicked()
{
SignUpWindow* sWindow;
Customer customer;
bool properFields = false;
sWindow = new SignUpWindow;
sWindow->setModal(true);
int submitSuccess = sWindow->exec();
if (submitSuccess)
{
sWindow->on_buttonBox_accepted(customer, properFields);
if (properFields)
{
// check if the customer is not taken
if (!customerList.isExist(customer)
&& !customerList.isExistSameName(customer.getUserName()))
{
customerList.Enqueue(customer);
updateCustomerList(&customerList);
QMessageBox::information(this, tr("Registration Successful"),tr("\"%1\", you will be notified shortly whether you have been accepted or rejected.").arg(customer.getUserName()));
// SIGNALS & SLOTS
// emit customerListChanged(&customerList);
}
else if (customerList.isExistSameName(customer.getUserName()))
{
QMessageBox::information(this, tr("Registration Unsuccessful"),tr("Please enter in another name,""\"%1\" is already taken").arg(customer.getUserName()));
}
else
{
QMessageBox::information(this, tr("Registration Unsuccessful"),
tr("\"%1\" is already in your "
"customer list.").arg(customer.getUserName()));
}
}
delete sWindow;
}
}
示例2: dispAccount
void Manager::dispAccount(int uID){
Customer foundCust = findCust(uID);
cout<<"\nUsername: " << foundCust.getUserName() << "\nID Number: " << foundCust.getID();
if (foundCust.hasChequing()){
cout<<"\nChequing Account Balance: $"<<foundCust.getBalance(0);
}
if (foundCust.hasSavings()){
cout<<"\nSavings Account Balance: $"<<foundCust.getBalance(1);
}
cout<<endl;
}
示例3:
bool Customer::operator <(const Customer& otherCustomer) const
{
return this->getUserName() < otherCustomer.getUserName();
}