protected function lstFedexAccount_Create()
 {
     $this->lstFedexAccount = new QListBox($this);
     $this->lstFedexAccount->Name = QApplication::Translate('Default FedEx® Integration Account:');
     $this->lstFedexAccount->Required = false;
     $this->lstFedexAccount->AddItem('- Select One -', null);
     $objAccountArray = ShippingAccount::LoadArrayByCourierId(1);
     if ($objAccountArray) {
         foreach ($objAccountArray as $objAccount) {
             $objListItem = new QListItem($objAccount->__toString(), $objAccount->ShippingAccountId);
             if (QApplication::$TracmorSettings->FedexAccountId && QApplication::$TracmorSettings->FedexAccountId == $objAccount->ShippingAccountId) {
                 $objListItem->Selected = true;
             }
             $this->lstFedexAccount->AddItem($objListItem);
         }
     }
     $this->lstFedexAccount->AddAction(new QChangeEvent(), new QAjaxAction('lstFedexAccount_Change'));
     $this->lstFedexAccount->AddAction(new QEnterKeyEvent(), new QTerminateAction());
 }
Beispiel #2
0
 /**
  * Gets all associated ShippingAccounts as an array of ShippingAccount objects
  * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
  * @return ShippingAccount[]
  */
 public function GetShippingAccountArray($objOptionalClauses = null)
 {
     if (is_null($this->intCourierId)) {
         return array();
     }
     try {
         return ShippingAccount::LoadArrayByCourierId($this->intCourierId, $objOptionalClauses);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
 }