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


PHP Address::LoadArrayByCompanyId方法代码示例

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


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

示例1: lstAddress_Create

 protected function lstAddress_Create()
 {
     $this->lstAddress = new QListBox($this);
     $this->lstAddress->Name = QApplication::Translate('Address');
     $this->lstAddress->AddItem(QApplication::Translate('- Select One -'), null);
     if ($this->lstCompany->SelectedValue) {
         $objAddressArray = Address::LoadArrayByCompanyId($this->lstCompany->SelectedValue);
     } else {
         $objAddressArray = Address::LoadAll();
     }
     if ($objAddressArray) {
         foreach ($objAddressArray as $objAddress) {
             $objListItem = new QListItem($objAddress->__toString(), $objAddress->AddressId);
             if ($this->objContact->Address && $this->objContact->Address->AddressId == $objAddress->AddressId) {
                 $objListItem->Selected = true;
             }
             $this->lstAddress->AddItem($objListItem);
         }
     }
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:20,代码来源:ContactEditPanel.class.php

示例2: lstToAddress_Create

 protected function lstToAddress_Create()
 {
     $this->lstToAddress = new QListBox($this);
     $this->lstToAddress->Name = QApplication::Translate('To Address');
     $this->lstToAddress->Required = true;
     if (!$this->blnEditMode) {
         $this->lstToAddress->AddItem('- Select One -', null);
     }
     $objToAddressArray = Address::LoadArrayByCompanyId(QApplication::$TracmorSettings->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Address()->ShortDescription)));
     if ($objToAddressArray) {
         foreach ($objToAddressArray as $objToAddress) {
             $objListItem = new QListItem($objToAddress->__toString(), $objToAddress->AddressId);
             if ($this->objReceipt->ToAddress && $this->objReceipt->ToAddress->AddressId == $objToAddress->AddressId) {
                 $objListItem->Selected = true;
             }
             $this->lstToAddress->AddItem($objListItem);
         }
     }
     $this->lstToAddress->TabIndex = 4;
     $this->intNextTabIndex++;
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:21,代码来源:receipt_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: 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

示例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: DeleteAllAddresses

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

示例7: GetAddressArray

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

示例8: lstFromAddress_Create

 public function lstFromAddress_Create()
 {
     $this->lstFromAddress = new QListBox($this, 'FromAddress');
     $this->lstFromAddress->Name = 'From Address';
     $objFromAddressArray = Address::LoadArrayByCompanyId(QApplication::$TracmorSettings->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Address()->ShortDescription)));
     if (is_array($objFromAddressArray) && count($objFromAddressArray) > 0) {
         foreach ($objFromAddressArray as $objFromAddress) {
             $objListItem = new QListItem($objFromAddress->__toString(), $objFromAddress->AddressId);
             $this->lstFromAddress->AddItem($objListItem);
         }
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:12,代码来源:ReceiptMassEditPanel.class.php


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