当前位置: 首页>>代码示例>>C++>>正文


C++ Customer::getUserName方法代码示例

本文整理汇总了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;
	}
}
开发者ID:AustinVaday,项目名称:CS1C-Class-Project,代码行数:47,代码来源:MainProgramWindow.cpp

示例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;
}
开发者ID:amaclean199,项目名称:ATM-App,代码行数:11,代码来源:user.cpp

示例3:

bool Customer::operator <(const Customer& otherCustomer) const
{
    return this->getUserName() < otherCustomer.getUserName();
}
开发者ID:AustinVaday,项目名称:CS1C-Class-Project,代码行数:4,代码来源:customerclass.cpp


注:本文中的Customer::getUserName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。