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


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

本文整理汇总了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()));
        }
    }
}
开发者ID:supermaximo93,项目名称:Computing_Project,代码行数:31,代码来源:MainWindow.cpp

示例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);
}
开发者ID:supermaximo93,项目名称:Computing_Project,代码行数:30,代码来源:JobShow.cpp


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