本文整理汇总了C++中Ticket::setCustomerID方法的典型用法代码示例。如果您正苦于以下问题:C++ Ticket::setCustomerID方法的具体用法?C++ Ticket::setCustomerID怎么用?C++ Ticket::setCustomerID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ticket
的用法示例。
在下文中一共展示了Ticket::setCustomerID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: scanOrphans
//.........这里部分代码省略.........
strcpy(tmpPhone, "");
workStr = connDB.curRow["DSLNumber"];
strcat(tmpPhone, workStr.substr(0, 3).c_str());
strcat(tmpPhone, "%%");
strcat(tmpPhone, workStr.substr(3, 3).c_str());
strcat(tmpPhone, "%%");
strcat(tmpPhone, workStr.substr(6, 4).c_str());
strcat(tmpPhone, "%%");
//printf("select * from PhoneNumbers where PhoneNumber LIKE '%s'\n", tmpPhone);
phoneDB.query("select * from PhoneNumbers where PhoneNumber LIKE '%s'", tmpPhone);
if (phoneDB.rowCount) {
// Found a matching phone number
phoneDB.getrow();
custID = atol(phoneDB.curRow["RefID"]);
workDB.dbcmd("update QwestDSLNotices set CustomerID = %ld where NoticeID = %ld", custID, atol(connDB.curRow["NoticeID"]));
// Now, add the notice into the customer notes.
ADBTable notesDB("Notes");
notesDB.setValue("AutoNote", 1);
notesDB.setValue("AddedBy", "Auto");
notesDB.setValue("NoteDate", connDB.curRow["NoticeDate"]);
notesDB.setValue("CustomerID", custID);
notesDB.setValue("NoteType", "Qwest DSL");
notesDB.setValue("Category", connDB.curRow["Action"]);
notesDB.setValue("SubCategory", "Connect Notice");
notesDB.setValue("Subject", connDB.curRow["Action"]);
strcpy(noteText, "");
strcat(noteText, "Action ");
strcat(noteText, connDB.curRow["Action"]);
strcat(noteText, "\n");
strcat(noteText, "Name ");
strcat(noteText, connDB.curRow["Name"]);
strcat(noteText, "\n");
strcat(noteText, "Addr1 ");
strcat(noteText, connDB.curRow["Addr1"]);
strcat(noteText, "\n");
strcat(noteText, "Addr2 ");
strcat(noteText, connDB.curRow["Addr2"]);
strcat(noteText, "\n");
strcat(noteText, "Addr3 ");
strcat(noteText, connDB.curRow["Addr3"]);
strcat(noteText, "\n");
strcat(noteText, "Select ");
strcat(noteText, connDB.curRow["Select256"]);
strcat(noteText, "\n");
strcat(noteText, "CBR Number ");
strcat(noteText, connDB.curRow["CBR"]);
strcat(noteText, "\n");
strcat(noteText, "DSL Phone ");
strcat(noteText, connDB.curRow["DSLNumber"]);
strcat(noteText, "\n");
strcat(noteText, "Blarg Circuit ");
strcat(noteText, connDB.curRow["BlargCircuit"]);
strcat(noteText, "\n");
strcat(noteText, "Due Date ");
strcat(noteText, connDB.curRow["DueDate"]);
strcat(noteText, "\n");
strcat(noteText, "Speed ");
strcat(noteText, connDB.curRow["LineSpeed"]);
strcat(noteText, "\n");
strcat(noteText, "VPI ");
strcat(noteText, connDB.curRow["VPI"]);
strcat(noteText, "\n");
strcat(noteText, "VCI ");
strcat(noteText, connDB.curRow["VCI"]);
strcat(noteText, "\n");
notesDB.setValue("NoteText", noteText);
notesDB.ins();
// Now that the note has been inserted, check for any
// tickets that may be opened on this line still.
if (atol(connDB.curRow["TicketNo"])) {
// We have a ticket. Load it up.
Ticket tmpTick;
tmpTick.setTicketNo(atol(connDB.curRow["TicketNo"]));
if (tmpTick.status() != Ticket::Closed) {
// The ticket is open. Set the customer ID and
// close it.
tmpTick.setCustomerID(custID);
tmpTick.setStatus(Ticket::Closed);
tmpTick.addLogEntry(Ticket::Normal, "DSL Number %s found for Customer ID %ld. Auto-closing ticket.", connDB.curRow["DSLNumber"], custID);
}
}
}
}
}