本文整理汇总了C++中Customer::getEmailAddress方法的典型用法代码示例。如果您正苦于以下问题:C++ Customer::getEmailAddress方法的具体用法?C++ Customer::getEmailAddress怎么用?C++ Customer::getEmailAddress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customer
的用法示例。
在下文中一共展示了Customer::getEmailAddress方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_label_remindCustomers_linkActivated
void MainWindow::on_label_remindCustomers_linkActivated(const QString &)
{
unpaidJobsReminderClicked = true;
ui->label_remindCustomers->setHidden(true);
Setting subject = SettingController::getSetting(SettingForm::keyReminderSubject),
body = SettingController::getSetting(SettingForm::keyReminderBody);
if (strlen(SettingController::getSetting(SettingForm::keyEmailHost).getValue()) == 0)
{ // If no email host is specified, use a mailto link to open the user's email client
for (unsigned i = 0; i < unpaidJobs->size(); ++i)
{
Customer customer = CustomerController::getCustomer(unpaidJobs->at(i).getCustomerId());
QString mailtoLink
= QString("mailto:") + customer.getEmailAddress()
+ "?subject=" + subject.getValue()
+ "&body=" + body.getValue();
QDesktopServices::openUrl(QUrl(mailtoLink));
}
}
else
{
for (unsigned i = 0; i < unpaidJobs->size(); ++i)
{
Customer customer = CustomerController::getCustomer(unpaidJobs->at(i).getCustomerId());
EmailerThread::enqueueEmail(EmailDetails(customer.getEmailAddress(), subject.getValue(), body.getValue()));
}
}
}
示例2: generateReceipt
void JobShow::generateReceipt()
{
Date jobDate(job.getDate());
QString saveFolder
= SettingForm::getPdfDirectoryWithoutSlash() + "/receipts/"
+ QDate::longMonthName(Date(job.getDate()).month) + '_' + toString(jobDate.year).c_str();
if (!QDir(saveFolder).exists()) QDir().mkpath(saveFolder);
Customer customer = CustomerController::getCustomer(job.getCustomerId());
customerEmailAddress = customer.getEmailAddress();
receiptFileName.clear();
receiptFileName.reserve(256);
receiptFileName += "receipt_";
receiptFileName += customer.getForename();
receiptFileName += customer.getSurname();
receiptFileName += "_";
receiptFileName += toString(job.getId());
receiptFileName += "_";
receiptFileName += (string)Date(job.getDate());
receiptFileName += ".pdf";
replaceChars(receiptFileName, ' ', '_');
replaceChars(receiptFileName, '/', '-');
replaceChars(receiptFileName, ':', '-');
receiptFileName = saveFolder.toStdString() + '/' + receiptFileName;
PdfGenerator::generateReceipt(receiptFileName.c_str(), job);
}