本文整理汇总了PHP中QQ::None方法的典型用法代码示例。如果您正苦于以下问题:PHP QQ::None方法的具体用法?PHP QQ::None怎么用?PHP QQ::None使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQ
的用法示例。
在下文中一共展示了QQ::None方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dtgPeople_Bind
public function dtgPeople_Bind()
{
$objConditions = QQ::All();
$objClauses = array();
$blnSearch = false;
if ($strName = trim($this->txtName->Text)) {
$blnSearch = true;
Person::PrepareQqForSearch($strName, $objConditions, $objClauses);
}
if ($strName = trim($this->txtFirstName->Text)) {
$blnSearch = true;
$objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->FirstName, $strName . '%'));
}
if ($strName = trim($this->txtLastName->Text)) {
$blnSearch = true;
$objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->LastName, $strName . '%'));
}
if ($strName = trim($this->txtCity->Text)) {
$blnSearch = true;
$objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->PrimaryCityText, $strName . '%'));
}
if ($strName = trim($this->txtAddress->Text)) {
$blnSearch = true;
$objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->PrimaryAddressText, $strName . '%'));
}
if ($strName = trim($this->txtPhone->Text)) {
$blnSearch = true;
$objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->PrimaryPhoneText, $strName . '%'));
}
// No Search Parameters -- Let's see if we should find the check account folks first
if (!$blnSearch) {
if ($this->objParentControl->mctContribution->StewardshipContribution->PossiblePeopleArray) {
$objConditions = QQ::Equal(QQN::Person()->CheckingAccountLookup->CheckingAccountLookupId, $this->objParentControl->mctContribution->StewardshipContribution->CheckingAccountLookupId);
} else {
$objConditions = QQ::None();
}
} else {
$this->dtgPeople->NoDataHtml = 'No results found. Please re-specify a search criteria above.';
}
$this->dtgPeople->MetaDataBinder($objConditions, $objClauses);
// Automagically "Select" the First Person if applicable
if (!$this->blnExplicitSelectionFlag && $this->dtgPeople->DataSource && count($this->dtgPeople->DataSource) > 0) {
$this->pxySelectPerson_Click(null, null, $this->dtgPeople->DataSource[0]->Id);
}
$this->blnExplicitSelectionFlag = false;
}
示例2: btnClear_Click
public function btnClear_Click()
{
$this->txtSearch->Text = '';
$this->dtgSuggestion->AdditionalConditions = QQ::None();
}
示例3: PrepareQqForSearch
/**
* Given a search term, this will try and match all similarly matched individuals.
* This will utilize soundex and other indexing methodologies.
*
* @param string $strName
* @param QQCondition $objCondition
* @param QQClause[] $objClauses
* @param QQNodePerson $objPersonNode
* @return void
*/
public static function PrepareQqForSearch($strName, QQCondition &$objCondition, &$objClauses, QQNodePerson $objPersonNode = null)
{
if (!$objPersonNode) {
$objPersonNode = QQN::Person();
}
$strNameItemArray = NameItem::GetNormalizedArrayFromNameString($strName, true);
// First, get the applicable NameItem
$intNameItemIdArrayArray = array();
foreach ($strNameItemArray as $strNameItem) {
$intNameItemIdArray = array();
$strQuery = sprintf("SELECT * FROM name_item WHERE (soundex(name) = soundex('%s') OR name LIKE '%s%%')", mysql_escape_string($strNameItem), mysql_escape_string($strNameItem));
$objNameItemArray = NameItem::InstantiateDbResult(NameItem::GetDatabase()->Query($strQuery));
foreach ($objNameItemArray as $objNameItem) {
$intNameItemIdArray[] = $objNameItem->Id;
}
$intNameItemIdArrayArray[] = $intNameItemIdArray;
}
// Build the search array from Person
$intIndex = 0;
foreach ($intNameItemIdArrayArray as $intNameItemIdArray) {
if (!count($intNameItemIdArray)) {
$objCondition = QQ::None();
return;
}
$intIndex++;
$strAlias = 'assn_' . $intIndex;
if ($intIndex == 2) {
$objClauses[] = QQ::Distinct();
}
$objClauses[] = QQ::CustomFrom('person_nameitem_assn', $strAlias);
if (count($intNameItemIdArray) == 1) {
$objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQ::CustomNode($strAlias . '.person_id'), $objPersonNode->Id), QQ::Equal(QQ::CustomNode($strAlias . '.name_item_id'), $intNameItemIdArray[0]));
} else {
$objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQ::CustomNode($strAlias . '.person_id'), $objPersonNode->Id), QQ::In(QQ::CustomNode($strAlias . '.name_item_id'), $intNameItemIdArray));
}
}
}
示例4: dtgContributions_Bind
protected function dtgContributions_Bind()
{
$this->CalculateQuery($objCondition, $objClauses, $blnQueried);
if ($blnQueried) {
$this->dtgContributions->MetaDataBinder($objCondition, $objClauses);
} else {
$this->dtgContributions->MetaDataBinder(QQ::None());
}
if ($this->blnPrintMode) {
$objDataSource = $this->dtgContributions->DataSource;
$objDataSource[] = new StewardshipContribution();
$this->dtgContributions->DataSource = $objDataSource;
}
}