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


PHP Contact::LoadArrayByCompanyId方法代码示例

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


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

示例1: lstFromCompany_Select

 protected function lstFromCompany_Select()
 {
     // Clear any displayed warnings
     $this->lblNewFromContact->Warning = '';
     if ($this->lstFromCompany->SelectedValue) {
         $objCompany = Company::Load($this->lstFromCompany->SelectedValue);
         if ($objCompany) {
             // Load the values for the 'From Contact' List
             if ($this->lstFromContact) {
                 $objFromContactArray = Contact::LoadArrayByCompanyId($objCompany->CompanyId);
                 if ($this->lstFromContact->SelectedValue) {
                     $SelectedContactId = $this->lstFromContact->SelectedValue;
                 } elseif ($this->objReceipt->FromContactId) {
                     $SelectedContactId = $this->objReceipt->FromContactId;
                 } else {
                     $SelectedContactId = null;
                 }
                 $this->lstFromContact->RemoveAllItems();
                 $this->lstFromContact->AddItem('- Select One -', null);
                 if ($objFromContactArray) {
                     foreach ($objFromContactArray as $objFromContact) {
                         $objListItem = new QListItem($objFromContact->__toString(), $objFromContact->ContactId);
                         if ($SelectedContactId == $objFromContact->ContactId) {
                             $objListItem->Selected = true;
                         }
                         $this->lstFromContact->AddItem($objListItem);
                     }
                 }
                 $this->lstFromContact->Enabled = true;
             }
         }
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:33,代码来源:receipt_edit.php

示例2: Form_PreRender

 protected function Form_PreRender()
 {
     $this->dtgContact->TotalItemCount = Contact::CountByCompanyId($this->objCompany->CompanyId);
     if ($this->dtgContact->TotalItemCount == 0) {
         $this->dtgContact->ShowHeader = false;
     } else {
         $objClauses = array();
         if ($objClause = $this->dtgContact->OrderByClause) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = $this->dtgContact->LimitClause) {
             array_push($objClauses, $objClause);
         }
         $this->dtgContact->DataSource = Contact::LoadArrayByCompanyId($this->objCompany->CompanyId, $objClauses);
         $this->dtgContact->ShowHeader = true;
     }
     $this->dtgAddress->TotalItemCount = Address::CountByCompanyId($this->objCompany->CompanyId);
     if ($this->dtgAddress->TotalItemCount == 0) {
         $this->dtgAddress->ShowHeader = false;
     } else {
         $objClauses = array();
         if ($objClause = $this->dtgAddress->OrderByClause) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = $this->dtgAddress->LimitClause) {
             array_push($objClauses, $objClause);
         }
         $this->dtgAddress->DataSource = Address::LoadArrayByCompanyId($this->objCompany->CompanyId, $objClauses);
         $this->dtgAddress->ShowHeader = true;
     }
     // Do not show the datagrids or 'Create New' buttons if creating a new company
     if (!$this->blnEditMode) {
         $this->btnCreateContact->Visible = false;
         $this->dtgContact->Visible = false;
         $this->btnCreateAddress->Visible = false;
         $this->dtgAddress->Visible = false;
     }
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:38,代码来源:company_edit.php

示例3: lstToCompany_Select

 public function lstToCompany_Select()
 {
     if ($this->pnlShipmentMassEdit->lstToCompany->SelectedValue) {
         $objCompany = Company::Load($this->pnlShipmentMassEdit->lstToCompany->SelectedValue);
         if ($objCompany) {
             // Load the values for the 'To Contact' List
             if ($this->pnlShipmentMassEdit->lstToContact) {
                 $objToContactArray = Contact::LoadArrayByCompanyId($objCompany->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Contact()->LastName, QQN::Contact()->FirstName)));
                 $this->pnlShipmentMassEdit->lstToContact->RemoveAllItems();
                 if ($objToContactArray) {
                     foreach ($objToContactArray as $objToContact) {
                         $objListItem = new QListItem($objToContact->__toString(), $objToContact->ContactId);
                         $this->pnlShipmentMassEdit->lstToContact->AddItem($objListItem);
                     }
                     $this->pnlShipmentMassEdit->lstToContact->Enabled = true;
                 }
             }
             // Load the values for the 'To Address' List
             if ($this->pnlShipmentMassEdit->lstToAddress) {
                 $objToAddressArray = Address::LoadArrayByCompanyId($objCompany->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Address()->ShortDescription)));
                 $this->pnlShipmentMassEdit->lstToAddress->RemoveAllItems();
                 if ($objToAddressArray) {
                     foreach ($objToAddressArray as $objToAddress) {
                         $objListItem = new QListItem($objToAddress->__toString(), $objToAddress->AddressId);
                         $this->pnlShipmentMassEdit->lstToAddress->AddItem($objListItem);
                     }
                     $this->pnlShipmentMassEdit->lstToAddress->Enabled = true;
                     //$this->lstToAddress_Select();
                 }
             }
         }
     }
 }
开发者ID:jdellinger,项目名称:tracmor,代码行数:33,代码来源:shipment_list.php

示例4: lstToCompany_Select

 public function lstToCompany_Select()
 {
     if ($this->lstToCompany->SelectedValue) {
         $objCompany = Company::Load($this->lstToCompany->SelectedValue);
         if ($objCompany) {
             // Load the values for the 'To Contact' List
             if ($this->lstToContact) {
                 $objToContactArray = Contact::LoadArrayByCompanyId($objCompany->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Contact()->LastName, QQN::Contact()->FirstName)));
                 $this->lstToContact->RemoveAllItems();
                 $this->lstToContact->AddItem('- Select One -', null);
                 if ($objToContactArray) {
                     foreach ($objToContactArray as $objToContact) {
                         $objListItem = new QListItem($objToContact->__toString(), $objToContact->ContactId);
                         $this->lstToContact->AddItem($objListItem);
                     }
                     $this->lstToContact->Enabled = true;
                 }
             }
         }
     } else {
         $this->lstToContact->Enabled = false;
         $this->lstToContact->RemoveAllItems();
         $this->lstToContact->AddItem('- Select One -', null);
     }
 }
开发者ID:jdellinger,项目名称:tracmor,代码行数:25,代码来源:QAssetTransactComposite.class.php

示例5: lstToCompany_Select

 protected function lstToCompany_Select()
 {
     $this->disableAdvancedIfInternal();
     // Clear any displayed warnings
     if ($this->lblNewToContact) {
         $this->lblNewToContact->Warning = '';
         $this->lblNewToAddress->Warning = '';
     }
     if ($this->lstToCompany->SelectedValue) {
         $objCompany = Company::Load($this->lstToCompany->SelectedValue);
         if ($objCompany) {
             // Load the values for the 'To Contact' List
             if ($this->lstToContact) {
                 $objToContactArray = Contact::LoadArrayByCompanyId($objCompany->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Contact()->LastName, QQN::Contact()->FirstName)));
                 if ($this->lstToContact->SelectedValue) {
                     $SelectedContactId = $this->lstToContact->SelectedValue;
                 } elseif ($this->objShipment->ToContactId) {
                     $SelectedContactId = $this->objShipment->ToContactId;
                 } else {
                     $SelectedContactId = null;
                 }
                 $this->lstToContact->RemoveAllItems();
                 $this->lstToContact->AddItem('- Select One -', null);
                 if ($objToContactArray) {
                     foreach ($objToContactArray as $objToContact) {
                         $objListItem = new QListItem($objToContact->__toString(), $objToContact->ContactId);
                         if ($SelectedContactId == $objToContact->ContactId) {
                             $objListItem->Selected = true;
                         }
                         $this->lstToContact->AddItem($objListItem);
                     }
                     $this->lstToContact->Enabled = true;
                 }
             }
             // Load the values for the 'To Address' List
             if ($this->lstToAddress) {
                 $objToAddressArray = Address::LoadArrayByCompanyId($objCompany->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Address()->ShortDescription)));
                 if ($this->lstToAddress->SelectedValue) {
                     $SelectedAddressId = $this->lstToAddress->SelectedValue;
                 } elseif ($this->objShipment->ToAddressId) {
                     $SelectedAddressId = $this->objShipment->ToAddressId;
                 } else {
                     $SelectedAddressId = null;
                 }
                 $this->lstToAddress->RemoveAllItems();
                 $this->lstToAddress->AddItem('- Select One -', null);
                 if ($objToAddressArray) {
                     foreach ($objToAddressArray as $objToAddress) {
                         $objListItem = new QListItem($objToAddress->__toString(), $objToAddress->AddressId);
                         if ($SelectedAddressId == $objToAddress->AddressId) {
                             $objListItem->Selected = true;
                         }
                         $this->lstToAddress->AddItem($objListItem);
                     }
                     $this->lstToAddress->Enabled = true;
                     $this->lstToAddress_Select();
                 }
             }
         }
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:61,代码来源:shipment_edit.php

示例6: DeleteAllContacts

    /**
     * Deletes all associated Contacts
     * @return void
     */
    public function DeleteAllContacts()
    {
        if (is_null($this->intCompanyId)) {
            throw new QUndefinedPrimaryKeyException('Unable to call UnassociateContact on this unsaved Company.');
        }
        // Get the Database Object for this Class
        $objDatabase = Company::GetDatabase();
        // Journaling
        if ($objDatabase->JournalingDatabase) {
            foreach (Contact::LoadArrayByCompanyId($this->intCompanyId) as $objContact) {
                $objContact->Journal('DELETE');
            }
        }
        // Perform the SQL Query
        $objDatabase->NonQuery('
				DELETE FROM
					`contact`
				WHERE
					`company_id` = ' . $objDatabase->SqlVariable($this->intCompanyId) . '
			');
    }
开发者ID:proxymoron,项目名称:tracmor,代码行数:25,代码来源:CompanyGen.class.php

示例7: GetContactArray

 /**
  * Gets all associated Contacts as an array of Contact objects
  * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
  * @return Contact[]
  */
 public function GetContactArray($objOptionalClauses = null)
 {
     if (is_null($this->intCompanyId)) {
         return array();
     }
     try {
         return Contact::LoadArrayByCompanyId($this->intCompanyId, $objOptionalClauses);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:17,代码来源:CompanyGen.class.php

示例8: lstToCompany_Select

 public function lstToCompany_Select()
 {
     if ($this->lstToCompany->SelectedValue) {
         $objCompany = Company::Load($this->lstToCompany->SelectedValue);
         if ($objCompany) {
             // Load the values for the 'To Contact' List
             if ($this->lstToContact) {
                 $objToContactArray = Contact::LoadArrayByCompanyId($objCompany->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Contact()->LastName, QQN::Contact()->FirstName)));
                 $this->lstToContact->RemoveAllItems();
                 $this->lstToContact->AddItem('Any', 'any_' . $objCompany->CompanyId);
                 if ($objToContactArray) {
                     foreach ($objToContactArray as $objToContact) {
                         $objListItem = new QListItem($objToContact->__toString(), $objToContact->ContactId);
                         $this->lstToContact->AddItem($objListItem);
                     }
                     //$this->lstToContact->Enabled = true;
                 }
                 // For companies that have no contacts
                 // Removed because SQL-query causes no errors
                 /*else {
                 		  $this->lstToContact->RemoveAllItems();
                 		  $this->lstToContact->AddItem('- Select One -', null);
                 		}*/
             }
         }
     } else {
         //$this->lstToContact->Enabled = false;
         $this->lstToContact->RemoveAllItems();
         $this->lstToContact->AddItem('- Select One -', null);
         $this->lstToContact->AddItem('Any', 'any');
     }
 }
开发者ID:brustj,项目名称:tracmor,代码行数:32,代码来源:QAdvancedSearchComposite.class.php


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