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


PHP QQ::OrCondition方法代码示例

本文整理汇总了PHP中QQ::OrCondition方法的典型用法代码示例。如果您正苦于以下问题:PHP QQ::OrCondition方法的具体用法?PHP QQ::OrCondition怎么用?PHP QQ::OrCondition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QQ的用法示例。


在下文中一共展示了QQ::OrCondition方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Form_Create

 protected function Form_Create()
 {
     $this->mctObject = ClassInstructorMetaControl::CreateFromPathInfo($this, QMetaControlCreateType::CreateOnRecordNotFound);
     if ($this->mctObject->EditMode) {
         $this->strPageTitle .= 'Edit Instructor';
     } else {
         $this->strPageTitle .= 'Create New Instructor';
     }
     $this->lstLogin = $this->mctObject->lstLogin_Create(null, QQ::OrCondition(QQ::AndCondition(QQ::IsNull(QQN::Login()->ClassInstructor->Id), QQ::Equal(QQN::Login()->LoginActiveFlag, true), QQ::Equal(QQN::Login()->DomainActiveFlag, true)), QQ::Equal(QQN::Login()->Id, $this->mctObject->ClassInstructor->LoginId)), QQ::OrderBy(QQN::Login()->FirstName, QQN::Login()->LastName));
     $this->txtDisplayName = $this->mctObject->txtDisplayName_Create();
     $this->txtDisplayName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->btnSave = new QButton($this);
     $this->btnSave->CssClass = 'primary';
     $this->btnSave->Text = $this->mctObject->EditMode ? 'Update' : 'Create';
     $this->btnSave->CausesValidation = true;
     $this->btnSave->AddAction(new QClickEvent(), new QAjaxAction('btnSave_Click'));
     $this->btnSave->AddAction(new QClickEvent(), new QTerminateAction());
     $this->btnCancel = new QLinkButton($this);
     $this->btnCancel->CssClass = 'cancel';
     $this->btnCancel->Text = 'Cancel';
     $this->btnCancel->AddAction(new QClickEvent(), new QAjaxAction('btnCancel_Click'));
     $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction());
     if ($this->mctObject->EditMode) {
         $this->btnDelete = new QLinkButton($this);
         $this->btnDelete->CssClass = 'delete';
         $this->btnDelete->Text = 'Delete';
         $this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to PERMANENTLY DELETE this?'));
         $this->btnDelete->AddAction(new QClickEvent(), new QAjaxAction('btnDelete_Click'));
         $this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction());
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:31,代码来源:instructor.php

示例2: dtgStaff_Bind

 public function dtgStaff_Bind()
 {
     $objConditions = QQ::All();
     if ($this->lstMinistry->SelectedValue) {
         $objConditions = QQ::AndCondition($objConditions, QQ::Equal(QQN::Login()->Ministry->MinistryId, $this->lstMinistry->SelectedValue));
     }
     if ($this->lstActiveFlag->SelectedValue) {
         $objConditions = QQ::AndCondition($objConditions, QQ::Equal(QQN::Login()->DomainActiveFlag, true), QQ::Equal(QQN::Login()->LoginActiveFlag, true));
     } else {
         $objConditions = QQ::AndCondition($objConditions, QQ::OrCondition(QQ::Equal(QQN::Login()->DomainActiveFlag, false), QQ::Equal(QQN::Login()->LoginActiveFlag, false)));
     }
     $this->dtgStaff->TotalItemCount = Login::QueryCount($objConditions);
     // Setup the $objClauses Array
     $objClauses = array();
     // If a column is selected to be sorted, and if that column has a OrderByClause set on it, then let's add
     // the OrderByClause to the $objClauses array
     if ($objClause = $this->dtgStaff->OrderByClause) {
         array_push($objClauses, $objClause);
     }
     // Add the LimitClause information, as well
     if ($objClause = $this->dtgStaff->LimitClause) {
         array_push($objClauses, $objClause);
     }
     // Set the DataSource to be a Query result from Login, given the clauses above
     $this->dtgStaff->DataSource = Login::QueryArray($objConditions, $objClauses);
 }
开发者ID:alcf,项目名称:chms,代码行数:26,代码来源:index.php

示例3: dtgGroupRegistration_Bind

 protected function dtgGroupRegistration_Bind()
 {
     $objConditions = QQ::All();
     $objClauses = QQ::Clause($this->dtgGroupRegistrations->OrderByClause);
     if (!$this->chkShowInactive->Checked) {
         $objConditions = QQ::AndCondition($objConditions, QQ::OrCondition(QQ::Equal(QQN::GroupRegistrations()->ProcessedFlag, false), QQ::IsNull(QQN::GroupRegistrations()->ProcessedFlag)));
     }
     $this->dtgGroupRegistrations->DataSource = GroupRegistrations::QueryArray($objConditions, $objClauses);
 }
开发者ID:alcf,项目名称:chms,代码行数:9,代码来源:process_gg_registrations.php

示例4: testSelectSubsetInExpand

 public function testSelectSubsetInExpand()
 {
     $objPersonArray = Person::QueryArray(QQ::OrCondition(QQ::Like(QQN::Person()->ProjectAsManager->Name, '%ACME%'), QQ::Like(QQN::Person()->ProjectAsManager->Name, '%HR%')), QQ::Clause(QQ::Select(QQN::Person()->LastName), QQ::Expand(QQN::Person()->ProjectAsManager, null, QQ::Select(QQN::Person()->ProjectAsManager->Spent)), QQ::OrderBy(QQN::Person()->LastName, QQN::Person()->FirstName)));
     foreach ($objPersonArray as $objPerson) {
         $this->assertNull($objPerson->FirstName, "FirstName should be null, since it was not selected");
         $this->assertNotNull($objPerson->Id, "Id should not be null since it's always added to the select list");
         $this->assertNotNull($objPerson->_ProjectAsManager->Id, "ProjectAsManager->Id should not be null since id's are always added to the select list");
         $this->assertNull($objPerson->_ProjectAsManager->Name, "ProjectAsManager->Name should be null since it was not selected");
     }
 }
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:10,代码来源:ExpandAsArrayTests.php

示例5: auto_Bind

 public function auto_Bind($strFormId, $strControlId, $term)
 {
     $cond = QQ::OrCondition(QQ::Like(QQN::Person()->FirstName, '%' . $term . '%'), QQ::Like(QQN::Person()->LastName, '%' . $term . '%'));
     $a = Person::QueryArray($cond);
     $items = array();
     foreach ($a as $obj) {
         $items[] = new QListItem($obj->FirstName . ' ' . $obj->LastName, $obj->Id);
     }
     $this->auto2->DataSource = $items;
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:10,代码来源:ui_select.php

示例6: BindData

 protected function BindData()
 {
     if ($strFilter = $this->dtgTable->Search["search"]) {
         $objCondition = QQ::OrCondition(QQ::Like(QQN::Person()->FirstName, '%' . $strFilter . '%'), QQ::Like(QQN::Person()->LastName, '%' . $strFilter . '%'));
     } else {
         $objCondition = QQ::All();
     }
     $this->dtgTable->TotalItemCount = Person::QueryCount($objCondition);
     $objClauses[] = $this->dtgTable->OrderByClause;
     $objClauses[] = $this->dtgTable->LimitClause;
     $this->dtgTable->DataSource = Person::QueryArray($objCondition, $objClauses);
 }
开发者ID:qcubed,项目名称:plugin_datatables,代码行数:12,代码来源:datatables2.php

示例7: GetAssetLog

 protected function GetAssetLog()
 {
     $objClauses = array();
     array_push($objClauses, QQ::OrderBy(QQN::Assetsauditlog()->RealReturnDate));
     if ($this->txtSearchTerm->Text == "") {
         $condition = QQ::Equal(QQN::Assetsauditlog()->Owner, $_SESSION['User']);
         $myassets = Assetsauditlog::QueryArray($condition, $objClauses);
     } else {
         $objCondition = QQ::AndCondition(QQ::OrCondition(QQ::Like(QQN::Assetsauditlog()->Asin, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Assetsauditlog()->Email, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Assetsauditlog()->Title, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Assetsauditlog()->FullName, '%' . $this->txtSearchTerm->Text . '%')), QQ::Equal(QQN::Assetsauditlog()->Owner, $_SESSION['User']));
         $objDbResult = Assetsauditlog::QueryArray($objCondition, $objClauses);
         $myassets = $objDbResult;
     }
     return $myassets;
 }
开发者ID:sarapsg,项目名称:prayuj,代码行数:14,代码来源:AssetLog.php

示例8: getList

 protected function getList($strTerm = null, $blnHtml = false)
 {
     if ($strTerm) {
         $cond = QQ::OrCondition(QQ::Like(QQN::Person()->FirstName, '%' . $strTerm . '%'), QQ::Like(QQN::Person()->LastName, '%' . $strTerm . '%'));
     } else {
         $cond = QQ::All();
     }
     $clauses[] = QQ::OrderBy(QQN::Person()->LastName, QQN::Person()->FirstName);
     $lst = Person::QueryArray($cond, $clauses);
     $a = array();
     foreach ($lst as $objPerson) {
         $item = new QListItem($objPerson->FirstName . ' ' . $objPerson->LastName, $objPerson->Id);
         if ($blnHtml) {
             $item->Label = '<em>' . $objPerson->FirstName . ' ' . $objPerson->LastName . '</em>';
         }
         $a[] = $item;
     }
     return $a;
 }
开发者ID:qcubed,项目名称:plugin_autocomplete2,代码行数:19,代码来源:autocomplete2.php

示例9: GetShareDetails

 protected function GetShareDetails()
 {
     $objClauses = array();
     array_push($objClauses, QQ::OrderBy(QQN::Sharedetails()->ReturnDate));
     if ($objClause = $this->dtrShareDetails->LimitClause) {
         array_push($objClauses, $this->dtrShareDetails->LimitClause);
     }
     if ($this->txtSearchTerm->Text == "") {
         $objCondition = QQ::Equal(QQN::Sharedetails()->Owner, $_SESSION['User']);
         $myassets = Sharedetails::QueryArray($objCondition, $objClauses);
     } else {
         $objCondition = QQ::AndCondition(QQ::OrCondition(QQ::Like(QQN::Sharedetails()->Asin, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->Email, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->TakenDate, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->ReturnDate, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->Title, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->FullName, '%' . $this->txtSearchTerm->Text . '%')), QQ::Equal(QQN::Myassets()->Owner, $_SESSION['User']));
         $objDbResult = Sharedetails::QueryArray($objCondition, $objClauses);
         $myassets = $objDbResult;
     }
     //$this->dtrShareDetails->TotalItemCount = Sharedetails::QueryCount($condition);
     $this->arrShareDetails = $myassets;
     return $objCondition;
 }
开发者ID:sarapsg,项目名称:prayuj,代码行数:19,代码来源:postlogin.php

示例10: dtgGroups_Bind

 public function dtgGroups_Bind()
 {
     if ($this->chkViewAll->Checked) {
         $objClause = QQ::AndCondition(QQ::Equal(QQN::Group()->GroupParticipation->PersonId, $this->objPerson->Id), QQ::In(QQN::Group()->GroupTypeId, array(GroupType::RegularGroup, GroupType::GrowthGroup)));
     } else {
         $objClause = QQ::AndCondition(QQ::Equal(QQN::Group()->GroupParticipation->PersonId, $this->objPerson->Id), QQ::IsNull(QQN::Group()->GroupParticipation->DateEnd), QQ::In(QQN::Group()->GroupTypeId, array(GroupType::RegularGroup, GroupType::GrowthGroup)));
     }
     // Admins can view anything
     if (QApplication::$Login->RoleTypeId == RoleType::ChMSAdministrator) {
     } else {
         // Non-Admins can only view non-confidential groups
         // OR groups that they are associated with
         $intMinistryIdArray = array();
         foreach (QApplication::$Login->GetMinistryArray() as $objMinistry) {
             $intMinistryIdArray[] = $objMinistry->Id;
         }
         $objSubClause = QQ::OrCondition(QQ::Equal(QQN::Group()->ConfidentialFlag, false), QQ::In(QQN::Group()->MinistryId, $intMinistryIdArray));
         $objClause = QQ::AndCondition($objClause, $objSubClause);
     }
     $this->dtgGroups->DataSource = Group::QueryArray($objClause, QQ::Distinct());
 }
开发者ID:alcf,项目名称:chms,代码行数:21,代码来源:Vicp_Groups.class.php

示例11: GetContacts

 public static function GetContacts($strKeyword = null)
 {
     if (!is_null($strKeyword)) {
         $condition = QQ::AndCondition(QQ::OrCondition(QQ::Like(QQN::Peopledetails()->FullName, '%' . $strKeyword . '%'), QQ::Like(QQN::Peopledetails()->Email, '%' . $strKeyword . '%'), QQ::Like(QQN::Peopledetails()->Address, '%' . $strKeyword . '%'), QQ::Like(QQN::Peopledetails()->Phone, '%' . $strKeyword . '%')), QQ::Equal(QQN::Peopledetails()->Owner, $_SESSION['User']));
         $objPeopleArray = Peopledetails::QueryArray($condition);
         return $objPeopleArray;
     } else {
         $condition = QQ::Equal(QQN::Peopledetails()->Owner, $_SESSION['User']);
         $objPeopleArray = Peopledetails::QueryArray($condition);
         return $objPeopleArray;
     }
 }
开发者ID:sarapsg,项目名称:prayuj,代码行数:12,代码来源:peopledetails_list.php

示例12: dtgShipmentReceipt_Bind

 protected function dtgShipmentReceipt_Bind()
 {
     // Get Total Count for Pagination
     $objClauses = array();
     $this->ctlAssetEdit->dtgShipmentReceipt->TotalItemCount = AssetTransaction::CountShipmentReceiptByAssetId($this->ctlAssetEdit->objAsset->AssetId);
     if ($this->ctlAssetEdit->dtgShipmentReceipt->TotalItemCount === 0) {
         $this->ctlAssetEdit->lblShipmentReceipt->Display = false;
         $this->ctlAssetEdit->dtgShipmentReceipt->ShowHeader = false;
     } else {
         $objClauses = array();
         if ($objClause = QQ::OrderBy(QQN::AssetTransaction()->Transaction->CreationDate, false)) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = $this->ctlAssetEdit->dtgShipmentReceipt->LimitClause) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = QQ::Expand(QQN::AssetTransaction()->Transaction->Shipment)) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = QQ::Expand(QQN::AssetTransaction()->Transaction->Receipt)) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = QQ::Expand(QQN::AssetTransaction()->SourceLocation)) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = QQ::Expand(QQN::AssetTransaction()->DestinationLocation)) {
             array_push($objClauses, $objClause);
         }
         $objCondition = QQ::AndCondition(QQ::Equal(QQN::AssetTransaction()->AssetId, $this->ctlAssetEdit->objAsset->AssetId), QQ::OrCondition(QQ::Equal(QQN::AssetTransaction()->Transaction->TransactionTypeId, 6), QQ::Equal(QQN::AssetTransaction()->Transaction->TransactionTypeId, 7)));
         $this->ctlAssetEdit->dtgShipmentReceipt->DataSource = AssetTransaction::QueryArray($objCondition, $objClauses);
     }
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:32,代码来源:asset_edit.php

示例13: GetSplitArray

 /**
  * Get an ordered lists of householdsplit objects for this household
  * in reverse chronological order.
  * @return HouseholdSplit[]
  */
 public function GetSplitArray()
 {
     return HouseholdSplit::QueryArray(QQ::OrCondition(QQ::Equal(QQN::HouseholdSplit()->HouseholdId, $this->Id), QQ::Equal(QQN::HouseholdSplit()->SplitHouseholdId, $this->Id)), QQ::OrderBy(QQN::HouseholdSplit()->DateSplit, false));
 }
开发者ID:alcf,项目名称:chms,代码行数:9,代码来源:Household.class.php

示例14: update_autocompleteList

 protected function update_autocompleteList($strFormId, $strControlId, $strParameter)
 {
     $strLookup = $strParameter;
     $objControl = $this->GetControl($strControlId);
     $cond = QQ::OrCondition(QQ::Like(QQN::Person()->FirstName, '%' . $strLookup . '%'), QQ::Like(QQN::Person()->LastName, '%' . $strLookup . '%'));
     $clauses[] = QQ::OrderBy(QQN::Person()->LastName, QQN::Person()->FirstName);
     $lst = Person::QueryArray($cond, $clauses);
     /*
      * If you implement Person::__toString in the model->Person.class.php file, you
      * could just pass the $lst to the DataSource. If you want to add a 'label' item
      * to the display, you can override toJsObject in the People.class.php file.
      * 
      * For puposes of this example, we will build a custom list using list items below.
      * 
      */
     //$this->AjaxAutocomplete->DataSource = $lst;
     $a = array();
     foreach ($lst as $objPerson) {
         $item = new QListItem($objPerson->FirstName . ' ' . $objPerson->LastName, $objPerson->Id);
         if ($objControl->DisplayHtml) {
             $item->Label = '<em>' . $objPerson->FirstName . ' ' . $objPerson->LastName . '</em>';
         }
         $a[] = $item;
     }
     $objControl->DataSource = $a;
 }
开发者ID:tomVertuoz,项目名称:framework,代码行数:26,代码来源:jq_example.php

示例15: CountShipmentReceiptByInventoryModelId

 /**
  * Count InventoryTransactions
  * by InventoryModelId Index(es), but only those transactions that are Shipments or Receipts
  * @param integer $intAssetId
  * @param boolean $blnInclude - include only shipments and receipts or all other transactions
  * @return int
  */
 public static function CountShipmentReceiptByInventoryModelId($intInventoryModelId, $blnInclude = true)
 {
     // Call AssetTransaction::QueryCount to perform the CountByAssetId query
     if ($blnInclude) {
         $arrToReturn = InventoryTransaction::QueryCount(QQ::AndCondition(QQ::Equal(QQN::InventoryTransaction()->InventoryLocation->InventoryModelId, $intInventoryModelId), QQ::OrCondition(QQ::Equal(QQN::InventoryTransaction()->Transaction->TransactionTypeId, 6), QQ::Equal(QQN::InventoryTransaction()->Transaction->TransactionTypeId, 7))));
     } else {
         $arrToReturn = InventoryTransaction::QueryCount(QQ::AndCondition(QQ::Equal(QQN::InventoryTransaction()->InventoryLocation->InventoryModelId, $intInventoryModelId), QQ::NotEqual(QQN::InventoryTransaction()->Transaction->TransactionTypeId, 6), QQ::NotEqual(QQN::InventoryTransaction()->Transaction->TransactionTypeId, 7)));
     }
     return $arrToReturn;
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:17,代码来源:InventoryTransaction.class.php


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