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


PHP UserAccount::LoadAll方法代码示例

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


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

示例1: Form_PreRender

 protected function Form_PreRender()
 {
     $objExpansionMap[UserAccount::ExpandCreatedByObject] = true;
     $objExpansionMap[UserAccount::ExpandRole] = true;
     // Get Total Count b/c of Pagination
     $this->dtgUserAccount->TotalItemCount = UserAccount::CountAll();
     if ($this->dtgUserAccount->TotalItemCount == 0) {
         $this->dtgUserAccount->ShowHeader = false;
     } else {
         $objClauses = array();
         if ($objClause = $this->dtgUserAccount->OrderByClause) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = $this->dtgUserAccount->LimitClause) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = QQ::Expand(QQN::UserAccount()->CreatedByObject)) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = QQ::Expand(QQN::UserAccount()->Role)) {
             $this->dtgUserAccount->DataSource = UserAccount::LoadAll($objClauses);
         }
         $this->dtgUserAccount->ShowHeader = true;
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:25,代码来源:user_account_list.php

示例2: Refresh

 /**
  * Refresh this MetaControl with Data from the local CustomField object.
  * @param boolean $blnReload reload CustomField from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objCustomField->Reload();
     }
     if ($this->lblCustomFieldId) {
         if ($this->blnEditMode) {
             $this->lblCustomFieldId->Text = $this->objCustomField->CustomFieldId;
         }
     }
     if ($this->lstCustomFieldQtype) {
         $this->lstCustomFieldQtype->SelectedValue = $this->objCustomField->CustomFieldQtypeId;
     }
     if ($this->lblCustomFieldQtypeId) {
         $this->lblCustomFieldQtypeId->Text = $this->objCustomField->CustomFieldQtypeId ? CustomFieldQtype::$NameArray[$this->objCustomField->CustomFieldQtypeId] : null;
     }
     if ($this->lstDefaultCustomFieldValue) {
         $this->lstDefaultCustomFieldValue->RemoveAllItems();
         $this->lstDefaultCustomFieldValue->AddItem(QApplication::Translate('- Select One -'), null);
         $objDefaultCustomFieldValueArray = CustomFieldValue::LoadAll();
         if ($objDefaultCustomFieldValueArray) {
             foreach ($objDefaultCustomFieldValueArray as $objDefaultCustomFieldValue) {
                 $objListItem = new QListItem($objDefaultCustomFieldValue->__toString(), $objDefaultCustomFieldValue->CustomFieldValueId);
                 if ($this->objCustomField->DefaultCustomFieldValue && $this->objCustomField->DefaultCustomFieldValue->CustomFieldValueId == $objDefaultCustomFieldValue->CustomFieldValueId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstDefaultCustomFieldValue->AddItem($objListItem);
             }
         }
     }
     if ($this->lblDefaultCustomFieldValueId) {
         $this->lblDefaultCustomFieldValueId->Text = $this->objCustomField->DefaultCustomFieldValue ? $this->objCustomField->DefaultCustomFieldValue->__toString() : null;
     }
     if ($this->txtShortDescription) {
         $this->txtShortDescription->Text = $this->objCustomField->ShortDescription;
     }
     if ($this->lblShortDescription) {
         $this->lblShortDescription->Text = $this->objCustomField->ShortDescription;
     }
     if ($this->chkActiveFlag) {
         $this->chkActiveFlag->Checked = $this->objCustomField->ActiveFlag;
     }
     if ($this->lblActiveFlag) {
         $this->lblActiveFlag->Text = $this->objCustomField->ActiveFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkRequiredFlag) {
         $this->chkRequiredFlag->Checked = $this->objCustomField->RequiredFlag;
     }
     if ($this->lblRequiredFlag) {
         $this->lblRequiredFlag->Text = $this->objCustomField->RequiredFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkAllAssetModelsFlag) {
         $this->chkAllAssetModelsFlag->Checked = $this->objCustomField->AllAssetModelsFlag;
     }
     if ($this->lblAllAssetModelsFlag) {
         $this->lblAllAssetModelsFlag->Text = $this->objCustomField->AllAssetModelsFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkSearchableFlag) {
         $this->chkSearchableFlag->Checked = $this->objCustomField->SearchableFlag;
     }
     if ($this->lblSearchableFlag) {
         $this->lblSearchableFlag->Text = $this->objCustomField->SearchableFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->lstCreatedByObject) {
         $this->lstCreatedByObject->RemoveAllItems();
         $this->lstCreatedByObject->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreatedByObjectArray = UserAccount::LoadAll();
         if ($objCreatedByObjectArray) {
             foreach ($objCreatedByObjectArray as $objCreatedByObject) {
                 $objListItem = new QListItem($objCreatedByObject->__toString(), $objCreatedByObject->UserAccountId);
                 if ($this->objCustomField->CreatedByObject && $this->objCustomField->CreatedByObject->UserAccountId == $objCreatedByObject->UserAccountId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreatedByObject->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreatedBy) {
         $this->lblCreatedBy->Text = $this->objCustomField->CreatedByObject ? $this->objCustomField->CreatedByObject->__toString() : null;
     }
     if ($this->calCreationDate) {
         $this->calCreationDate->DateTime = $this->objCustomField->CreationDate;
     }
     if ($this->lblCreationDate) {
         $this->lblCreationDate->Text = sprintf($this->objCustomField->CreationDate) ? $this->objCustomField->__toString($this->strCreationDateDateTimeFormat) : null;
     }
     if ($this->lstModifiedByObject) {
         $this->lstModifiedByObject->RemoveAllItems();
         $this->lstModifiedByObject->AddItem(QApplication::Translate('- Select One -'), null);
         $objModifiedByObjectArray = UserAccount::LoadAll();
         if ($objModifiedByObjectArray) {
             foreach ($objModifiedByObjectArray as $objModifiedByObject) {
                 $objListItem = new QListItem($objModifiedByObject->__toString(), $objModifiedByObject->UserAccountId);
                 if ($this->objCustomField->ModifiedByObject && $this->objCustomField->ModifiedByObject->UserAccountId == $objModifiedByObject->UserAccountId) {
                     $objListItem->Selected = true;
//.........这里部分代码省略.........
开发者ID:proxymoron,项目名称:tracmor,代码行数:101,代码来源:CustomFieldMetaControlGen.class.php

示例3: Form_Create

 protected function Form_Create()
 {
     if (QApplication::QueryString('intDownloadCsv')) {
         $this->RenderBegin(false);
         session_cache_limiter('must-revalidate');
         // force a "no cache" effect
         header("Pragma: hack");
         // IE chokes on "no cache", so set to something, anything, else.
         $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT";
         header($ExpStr);
         header('Content-Type: text/csv');
         header('Content-Disposition: csv; filename=skipped_records.csv');
         $file = fopen(sprintf("%s/%s_contact_skipped.csv", __TRACMOR_TMP__, $_SESSION['intUserAccountId']), "r");
         ob_end_clean();
         while ($row = fgets($file, 1000)) {
             print $row;
             @ob_flush();
             flush();
         }
         QApplication::$JavaScriptArray = array();
         QApplication::$JavaScriptArrayHighPriority = array();
         $this->RenderEnd(false);
         exit;
     }
     // Create the Header Menu
     $this->ctlHeaderMenu_Create();
     //$this->ctlShortcutMenu_Create();
     $this->pnlMain_Create();
     $this->pnlStepOne_Create();
     $this->Buttons_Create();
     $this->intStep = 1;
     $this->intSkippedRecordCount = 0;
     $this->blnImportEnd = true;
     $this->btnRemoveArray = array();
     $this->arrItemCustomField = array();
     $this->Labels_Create();
     $this->objDatabase = Asset::GetDatabase();
     // Load Custom Field
     foreach (CustomField::LoadArrayByActiveFlagEntity(1, EntityQtype::Contact) as $objCustomField) {
         $this->arrItemCustomField[$objCustomField->CustomFieldId] = $objCustomField;
     }
     $this->blnError = true;
     $intRoleId = QApplication::$objUserAccount->RoleId;
     $objRoleEntityQtypeBuiltInAuthorization = RoleEntityQtypeBuiltInAuthorization::LoadByRoleIdEntityQtypeIdAuthorizationId($intRoleId, EntityQtype::Contact, 2);
     // Check the user have edit permissions
     if ($objRoleEntityQtypeBuiltInAuthorization && $objRoleEntityQtypeBuiltInAuthorization->AuthorizedFlag) {
         $this->blnError = false;
     }
     if (isset($intCustomFieldIdArray) && count($intCustomFieldIdArray)) {
         //QApplication::$Database[1]->EnableProfiling();
         // Load restrict permisions for Custom Fields
         $objConditions = QQ::AndCondition(QQ::Equal(QQN::RoleEntityQtypeCustomFieldAuthorization()->RoleId, (string) $intRoleId), QQ::In(QQN::RoleEntityQtypeCustomFieldAuthorization()->EntityQtypeCustomField->CustomFieldId, $intCustomFieldIdArray), QQ::Equal(QQN::RoleEntityQtypeCustomFieldAuthorization()->AuthorizedFlag, false));
         $objClauses = array();
         array_push($objClauses, QQ::Expand(QQN::RoleEntityQtypeCustomFieldAuthorization()->EntityQtypeCustomField->EntityQtypeCustomFieldId));
         array_push($objClauses, QQ::OrderBy(QQN::RoleEntityQtypeCustomFieldAuthorization()->EntityQtypeCustomFieldId));
         $arrRoleEntityQtypeCustomFieldAuthorization = RoleEntityQtypeCustomFieldAuthorization::QueryArray($objConditions, $objClauses);
         if ($arrRoleEntityQtypeCustomFieldAuthorization) {
             foreach ($arrRoleEntityQtypeCustomFieldAuthorization as $objRoleAuth) {
                 if (array_key_exists($objRoleAuth->EntityQtypeCustomField->CustomFieldId, $this->arrAssetCustomField)) {
                     unset($this->arrAssetCustomField[$objRoleAuth->EntityQtypeCustomField->CustomFieldId]);
                 }
             }
         }
         //QApplication::$Database[1]->OutputProfiling();
     }
     $this->intUserArray = array();
     // Load Users
     foreach (UserAccount::LoadAll() as $objUser) {
         $this->intUserArray[strtolower($objUser->Username)] = $objUser->UserAccountId;
     }
     $this->strAcceptibleMimeArray = array('text/plain' => 'txt', 'text/comma-separated-values' => 'csv', 'text/csv' => 'csv', 'text/x-comma-separated-values' => 'csv', 'application/vnd.ms-excel' => 'csv', 'application/csv' => 'csv', 'text/x-csv' => 'csv');
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:72,代码来源:contact_import.php

示例4: Refresh

 /**
  * Refresh this MetaControl with Data from the local CustomFieldValue object.
  * @param boolean $blnReload reload CustomFieldValue from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objCustomFieldValue->Reload();
     }
     if ($this->lblCustomFieldValueId) {
         if ($this->blnEditMode) {
             $this->lblCustomFieldValueId->Text = $this->objCustomFieldValue->CustomFieldValueId;
         }
     }
     if ($this->lstCustomField) {
         $this->lstCustomField->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstCustomField->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objCustomFieldArray = CustomField::LoadAll();
         if ($objCustomFieldArray) {
             foreach ($objCustomFieldArray as $objCustomField) {
                 $objListItem = new QListItem($objCustomField->__toString(), $objCustomField->CustomFieldId);
                 if ($this->objCustomFieldValue->CustomField && $this->objCustomFieldValue->CustomField->CustomFieldId == $objCustomField->CustomFieldId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCustomField->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCustomFieldId) {
         $this->lblCustomFieldId->Text = $this->objCustomFieldValue->CustomField ? $this->objCustomFieldValue->CustomField->__toString() : null;
     }
     if ($this->txtShortDescription) {
         $this->txtShortDescription->Text = $this->objCustomFieldValue->ShortDescription;
     }
     if ($this->lblShortDescription) {
         $this->lblShortDescription->Text = $this->objCustomFieldValue->ShortDescription;
     }
     if ($this->lstCreatedByObject) {
         $this->lstCreatedByObject->RemoveAllItems();
         $this->lstCreatedByObject->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreatedByObjectArray = UserAccount::LoadAll();
         if ($objCreatedByObjectArray) {
             foreach ($objCreatedByObjectArray as $objCreatedByObject) {
                 $objListItem = new QListItem($objCreatedByObject->__toString(), $objCreatedByObject->UserAccountId);
                 if ($this->objCustomFieldValue->CreatedByObject && $this->objCustomFieldValue->CreatedByObject->UserAccountId == $objCreatedByObject->UserAccountId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreatedByObject->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreatedBy) {
         $this->lblCreatedBy->Text = $this->objCustomFieldValue->CreatedByObject ? $this->objCustomFieldValue->CreatedByObject->__toString() : null;
     }
     if ($this->calCreationDate) {
         $this->calCreationDate->DateTime = $this->objCustomFieldValue->CreationDate;
     }
     if ($this->lblCreationDate) {
         $this->lblCreationDate->Text = sprintf($this->objCustomFieldValue->CreationDate) ? $this->objCustomFieldValue->__toString($this->strCreationDateDateTimeFormat) : null;
     }
     if ($this->lstModifiedByObject) {
         $this->lstModifiedByObject->RemoveAllItems();
         $this->lstModifiedByObject->AddItem(QApplication::Translate('- Select One -'), null);
         $objModifiedByObjectArray = UserAccount::LoadAll();
         if ($objModifiedByObjectArray) {
             foreach ($objModifiedByObjectArray as $objModifiedByObject) {
                 $objListItem = new QListItem($objModifiedByObject->__toString(), $objModifiedByObject->UserAccountId);
                 if ($this->objCustomFieldValue->ModifiedByObject && $this->objCustomFieldValue->ModifiedByObject->UserAccountId == $objModifiedByObject->UserAccountId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstModifiedByObject->AddItem($objListItem);
             }
         }
     }
     if ($this->lblModifiedBy) {
         $this->lblModifiedBy->Text = $this->objCustomFieldValue->ModifiedByObject ? $this->objCustomFieldValue->ModifiedByObject->__toString() : null;
     }
     if ($this->lblModifiedDate) {
         if ($this->blnEditMode) {
             $this->lblModifiedDate->Text = $this->objCustomFieldValue->ModifiedDate;
         }
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:86,代码来源:CustomFieldValueMetaControlGen.class.php

示例5: Refresh

 /**
  * Refresh this MetaControl with Data from the local NotificationUserAccount object.
  * @param boolean $blnReload reload NotificationUserAccount from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objNotificationUserAccount->Reload();
     }
     if ($this->lblNotificationUserAccountId) {
         if ($this->blnEditMode) {
             $this->lblNotificationUserAccountId->Text = $this->objNotificationUserAccount->NotificationUserAccountId;
         }
     }
     if ($this->lstUserAccount) {
         $this->lstUserAccount->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstUserAccount->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objUserAccountArray = UserAccount::LoadAll();
         if ($objUserAccountArray) {
             foreach ($objUserAccountArray as $objUserAccount) {
                 $objListItem = new QListItem($objUserAccount->__toString(), $objUserAccount->UserAccountId);
                 if ($this->objNotificationUserAccount->UserAccount && $this->objNotificationUserAccount->UserAccount->UserAccountId == $objUserAccount->UserAccountId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstUserAccount->AddItem($objListItem);
             }
         }
     }
     if ($this->lblUserAccountId) {
         $this->lblUserAccountId->Text = $this->objNotificationUserAccount->UserAccount ? $this->objNotificationUserAccount->UserAccount->__toString() : null;
     }
     if ($this->lstNotification) {
         $this->lstNotification->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstNotification->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objNotificationArray = Notification::LoadAll();
         if ($objNotificationArray) {
             foreach ($objNotificationArray as $objNotification) {
                 $objListItem = new QListItem($objNotification->__toString(), $objNotification->NotificationId);
                 if ($this->objNotificationUserAccount->Notification && $this->objNotificationUserAccount->Notification->NotificationId == $objNotification->NotificationId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstNotification->AddItem($objListItem);
             }
         }
     }
     if ($this->lblNotificationId) {
         $this->lblNotificationId->Text = $this->objNotificationUserAccount->Notification ? $this->objNotificationUserAccount->Notification->__toString() : null;
     }
     if ($this->txtLevel) {
         $this->txtLevel->Text = $this->objNotificationUserAccount->Level;
     }
     if ($this->lblLevel) {
         $this->lblLevel->Text = $this->objNotificationUserAccount->Level;
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:60,代码来源:NotificationUserAccountMetaControlGen.class.php

示例6: Refresh

 /**
  * Refresh this MetaControl with Data from the local AssetTransactionCheckout object.
  * @param boolean $blnReload reload AssetTransactionCheckout from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objAssetTransactionCheckout->Reload();
     }
     if ($this->lblAssetTransactionCheckoutId) {
         if ($this->blnEditMode) {
             $this->lblAssetTransactionCheckoutId->Text = $this->objAssetTransactionCheckout->AssetTransactionCheckoutId;
         }
     }
     if ($this->lstAssetTransaction) {
         $this->lstAssetTransaction->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstAssetTransaction->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objAssetTransactionArray = AssetTransaction::LoadAll();
         if ($objAssetTransactionArray) {
             foreach ($objAssetTransactionArray as $objAssetTransaction) {
                 $objListItem = new QListItem($objAssetTransaction->__toString(), $objAssetTransaction->AssetTransactionId);
                 if ($this->objAssetTransactionCheckout->AssetTransaction && $this->objAssetTransactionCheckout->AssetTransaction->AssetTransactionId == $objAssetTransaction->AssetTransactionId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstAssetTransaction->AddItem($objListItem);
             }
         }
     }
     if ($this->lblAssetTransactionId) {
         $this->lblAssetTransactionId->Text = $this->objAssetTransactionCheckout->AssetTransaction ? $this->objAssetTransactionCheckout->AssetTransaction->__toString() : null;
     }
     if ($this->lstToContact) {
         $this->lstToContact->RemoveAllItems();
         $this->lstToContact->AddItem(QApplication::Translate('- Select One -'), null);
         $objToContactArray = Contact::LoadAll();
         if ($objToContactArray) {
             foreach ($objToContactArray as $objToContact) {
                 $objListItem = new QListItem($objToContact->__toString(), $objToContact->ContactId);
                 if ($this->objAssetTransactionCheckout->ToContact && $this->objAssetTransactionCheckout->ToContact->ContactId == $objToContact->ContactId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstToContact->AddItem($objListItem);
             }
         }
     }
     if ($this->lblToContactId) {
         $this->lblToContactId->Text = $this->objAssetTransactionCheckout->ToContact ? $this->objAssetTransactionCheckout->ToContact->__toString() : null;
     }
     if ($this->lstToUser) {
         $this->lstToUser->RemoveAllItems();
         $this->lstToUser->AddItem(QApplication::Translate('- Select One -'), null);
         $objToUserArray = UserAccount::LoadAll();
         if ($objToUserArray) {
             foreach ($objToUserArray as $objToUser) {
                 $objListItem = new QListItem($objToUser->__toString(), $objToUser->UserAccountId);
                 if ($this->objAssetTransactionCheckout->ToUser && $this->objAssetTransactionCheckout->ToUser->UserAccountId == $objToUser->UserAccountId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstToUser->AddItem($objListItem);
             }
         }
     }
     if ($this->lblToUserId) {
         $this->lblToUserId->Text = $this->objAssetTransactionCheckout->ToUser ? $this->objAssetTransactionCheckout->ToUser->__toString() : null;
     }
     if ($this->calDueDate) {
         $this->calDueDate->DateTime = $this->objAssetTransactionCheckout->DueDate;
     }
     if ($this->lblDueDate) {
         $this->lblDueDate->Text = sprintf($this->objAssetTransactionCheckout->DueDate) ? $this->objAssetTransactionCheckout->__toString($this->strDueDateDateTimeFormat) : null;
     }
     if ($this->lstCreatedByObject) {
         $this->lstCreatedByObject->RemoveAllItems();
         $this->lstCreatedByObject->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreatedByObjectArray = UserAccount::LoadAll();
         if ($objCreatedByObjectArray) {
             foreach ($objCreatedByObjectArray as $objCreatedByObject) {
                 $objListItem = new QListItem($objCreatedByObject->__toString(), $objCreatedByObject->UserAccountId);
                 if ($this->objAssetTransactionCheckout->CreatedByObject && $this->objAssetTransactionCheckout->CreatedByObject->UserAccountId == $objCreatedByObject->UserAccountId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreatedByObject->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreatedBy) {
         $this->lblCreatedBy->Text = $this->objAssetTransactionCheckout->CreatedByObject ? $this->objAssetTransactionCheckout->CreatedByObject->__toString() : null;
     }
     if ($this->calCreationDate) {
         $this->calCreationDate->DateTime = $this->objAssetTransactionCheckout->CreationDate;
     }
     if ($this->lblCreationDate) {
         $this->lblCreationDate->Text = sprintf($this->objAssetTransactionCheckout->CreationDate) ? $this->objAssetTransactionCheckout->__toString($this->strCreationDateDateTimeFormat) : null;
     }
     if ($this->lstModifiedByObject) {
         $this->lstModifiedByObject->RemoveAllItems();
         $this->lstModifiedByObject->AddItem(QApplication::Translate('- Select One -'), null);
//.........这里部分代码省略.........
开发者ID:proxymoron,项目名称:tracmor,代码行数:101,代码来源:AssetTransactionCheckoutMetaControlGen.class.php

示例7: Refresh

 /**
  * Refresh this MetaControl with Data from the local Transaction object.
  * @param boolean $blnReload reload Transaction from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objTransaction->Reload();
     }
     if ($this->lblTransactionId) {
         if ($this->blnEditMode) {
             $this->lblTransactionId->Text = $this->objTransaction->TransactionId;
         }
     }
     if ($this->lstEntityQtype) {
         $this->lstEntityQtype->SelectedValue = $this->objTransaction->EntityQtypeId;
     }
     if ($this->lblEntityQtypeId) {
         $this->lblEntityQtypeId->Text = $this->objTransaction->EntityQtypeId ? EntityQtype::$NameArray[$this->objTransaction->EntityQtypeId] : null;
     }
     if ($this->lstTransactionType) {
         $this->lstTransactionType->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstTransactionType->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objTransactionTypeArray = TransactionType::LoadAll();
         if ($objTransactionTypeArray) {
             foreach ($objTransactionTypeArray as $objTransactionType) {
                 $objListItem = new QListItem($objTransactionType->__toString(), $objTransactionType->TransactionTypeId);
                 if ($this->objTransaction->TransactionType && $this->objTransaction->TransactionType->TransactionTypeId == $objTransactionType->TransactionTypeId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstTransactionType->AddItem($objListItem);
             }
         }
     }
     if ($this->lblTransactionTypeId) {
         $this->lblTransactionTypeId->Text = $this->objTransaction->TransactionType ? $this->objTransaction->TransactionType->__toString() : null;
     }
     if ($this->txtNote) {
         $this->txtNote->Text = $this->objTransaction->Note;
     }
     if ($this->lblNote) {
         $this->lblNote->Text = $this->objTransaction->Note;
     }
     if ($this->lstCreatedByObject) {
         $this->lstCreatedByObject->RemoveAllItems();
         $this->lstCreatedByObject->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreatedByObjectArray = UserAccount::LoadAll();
         if ($objCreatedByObjectArray) {
             foreach ($objCreatedByObjectArray as $objCreatedByObject) {
                 $objListItem = new QListItem($objCreatedByObject->__toString(), $objCreatedByObject->UserAccountId);
                 if ($this->objTransaction->CreatedByObject && $this->objTransaction->CreatedByObject->UserAccountId == $objCreatedByObject->UserAccountId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreatedByObject->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreatedBy) {
         $this->lblCreatedBy->Text = $this->objTransaction->CreatedByObject ? $this->objTransaction->CreatedByObject->__toString() : null;
     }
     if ($this->calCreationDate) {
         $this->calCreationDate->DateTime = $this->objTransaction->CreationDate;
     }
     if ($this->lblCreationDate) {
         $this->lblCreationDate->Text = sprintf($this->objTransaction->CreationDate) ? $this->objTransaction->__toString($this->strCreationDateDateTimeFormat) : null;
     }
     if ($this->lstModifiedByObject) {
         $this->lstModifiedByObject->RemoveAllItems();
         $this->lstModifiedByObject->AddItem(QApplication::Translate('- Select One -'), null);
         $objModifiedByObjectArray = UserAccount::LoadAll();
         if ($objModifiedByObjectArray) {
             foreach ($objModifiedByObjectArray as $objModifiedByObject) {
                 $objListItem = new QListItem($objModifiedByObject->__toString(), $objModifiedByObject->UserAccountId);
                 if ($this->objTransaction->ModifiedByObject && $this->objTransaction->ModifiedByObject->UserAccountId == $objModifiedByObject->UserAccountId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstModifiedByObject->AddItem($objListItem);
             }
         }
     }
     if ($this->lblModifiedBy) {
         $this->lblModifiedBy->Text = $this->objTransaction->ModifiedByObject ? $this->objTransaction->ModifiedByObject->__toString() : null;
     }
     if ($this->lblModifiedDate) {
         if ($this->blnEditMode) {
             $this->lblModifiedDate->Text = $this->objTransaction->ModifiedDate;
         }
     }
     if ($this->lstReceipt) {
         $this->lstReceipt->RemoveAllItems();
         $this->lstReceipt->AddItem(QApplication::Translate('- Select One -'), null);
         $objReceiptArray = Receipt::LoadAll();
         if ($objReceiptArray) {
             foreach ($objReceiptArray as $objReceipt) {
                 $objListItem = new QListItem($objReceipt->__toString(), $objReceipt->ReceiptId);
                 if ($objReceipt->TransactionId == $this->objTransaction->TransactionId) {
                     $objListItem->Selected = true;
//.........这里部分代码省略.........
开发者ID:proxymoron,项目名称:tracmor,代码行数:101,代码来源:TransactionMetaControlGen.class.php

示例8: lstUserAccount_Create

 protected function lstUserAccount_Create()
 {
     $this->lstUserAccount = new QListBox($this);
     $this->lstUserAccount->Name = QApplication::Translate('User Account');
     $this->lstUserAccount->Required = true;
     if (!$this->blnEditMode) {
         $this->lstUserAccount->AddItem(QApplication::Translate('- Select One -'), null);
     }
     $objUserAccountArray = UserAccount::LoadAll();
     if ($objUserAccountArray) {
         foreach ($objUserAccountArray as $objUserAccount) {
             $objListItem = new QListItem($objUserAccount->__toString(), $objUserAccount->UserAccountId);
             if ($this->objNotificationUserAccount->UserAccount && $this->objNotificationUserAccount->UserAccount->UserAccountId == $objUserAccount->UserAccountId) {
                 $objListItem->Selected = true;
             }
             $this->lstUserAccount->AddItem($objListItem);
         }
     }
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:19,代码来源:NotificationUserAccountEditFormBase.class.php

示例9: dtgUserAccount_Bind

 public function dtgUserAccount_Bind()
 {
     $objClauses = array();
     if ($objClause = $this->dtgUserAccount->OrderByClause) {
         array_push($objClauses, $objClause);
     }
     $objClause = QQ::Expand(QQN::UserAccount()->CreatedByObject);
     array_push($objClauses, $objClause);
     $objClause = QQ::Expand(QQN::UserAccount()->Role);
     array_push($objClauses, $objClause);
     $this->strUsername = $this->txtUsername->Text;
     if ($this->strUsername) {
         $this->dtgUserAccount->TotalItemCount = UserAccount::QueryCount(QQ::Like(QQN::UserAccount()->Username, '%' . $this->strUsername . '%'), $objClauses);
         if ($this->dtgUserAccount->TotalItemCount > 0) {
             $this->dtgUserAccount->ShowHeader = true;
             // Add the LimitClause information, as well
             if ($objClause = $this->dtgUserAccount->LimitClause) {
                 array_push($objClauses, $objClause);
             }
             $this->dtgUserAccount->DataSource = UserAccount::QueryArray(QQ::Like(QQN::UserAccount()->Username, '%' . $this->strUsername . '%'), $objClauses);
         } else {
             $this->dtgUserAccount->ShowHeader = false;
         }
     } else {
         // Get Total Count b/c of Pagination
         $this->dtgUserAccount->TotalItemCount = UserAccount::CountAll();
         if ($this->dtgUserAccount->TotalItemCount == 0) {
             $this->dtgUserAccount->ShowHeader = false;
         } else {
             if ($objClause = $this->dtgUserAccount->LimitClause) {
                 array_push($objClauses, $objClause);
             }
             $this->dtgUserAccount->DataSource = UserAccount::LoadAll($objClauses);
             $this->dtgUserAccount->ShowHeader = true;
         }
     }
 }
开发者ID:brustj,项目名称:tracmor,代码行数:37,代码来源:QUserSearchComposite.class.php

示例10: Refresh

 /**
  * Refresh this MetaControl with Data from the local RoleEntityQtypeCustomFieldAuthorization object.
  * @param boolean $blnReload reload RoleEntityQtypeCustomFieldAuthorization from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objRoleEntityQtypeCustomFieldAuthorization->Reload();
     }
     if ($this->lblRoleEntityQtypeCustomFieldAuthorizationId) {
         if ($this->blnEditMode) {
             $this->lblRoleEntityQtypeCustomFieldAuthorizationId->Text = $this->objRoleEntityQtypeCustomFieldAuthorization->RoleEntityQtypeCustomFieldAuthorizationId;
         }
     }
     if ($this->lstRole) {
         $this->lstRole->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstRole->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objRoleArray = Role::LoadAll();
         if ($objRoleArray) {
             foreach ($objRoleArray as $objRole) {
                 $objListItem = new QListItem($objRole->__toString(), $objRole->RoleId);
                 if ($this->objRoleEntityQtypeCustomFieldAuthorization->Role && $this->objRoleEntityQtypeCustomFieldAuthorization->Role->RoleId == $objRole->RoleId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstRole->AddItem($objListItem);
             }
         }
     }
     if ($this->lblRoleId) {
         $this->lblRoleId->Text = $this->objRoleEntityQtypeCustomFieldAuthorization->Role ? $this->objRoleEntityQtypeCustomFieldAuthorization->Role->__toString() : null;
     }
     if ($this->lstEntityQtypeCustomField) {
         $this->lstEntityQtypeCustomField->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstEntityQtypeCustomField->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objEntityQtypeCustomFieldArray = EntityQtypeCustomField::LoadAll();
         if ($objEntityQtypeCustomFieldArray) {
             foreach ($objEntityQtypeCustomFieldArray as $objEntityQtypeCustomField) {
                 $objListItem = new QListItem($objEntityQtypeCustomField->__toString(), $objEntityQtypeCustomField->EntityQtypeCustomFieldId);
                 if ($this->objRoleEntityQtypeCustomFieldAuthorization->EntityQtypeCustomField && $this->objRoleEntityQtypeCustomFieldAuthorization->EntityQtypeCustomField->EntityQtypeCustomFieldId == $objEntityQtypeCustomField->EntityQtypeCustomFieldId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstEntityQtypeCustomField->AddItem($objListItem);
             }
         }
     }
     if ($this->lblEntityQtypeCustomFieldId) {
         $this->lblEntityQtypeCustomFieldId->Text = $this->objRoleEntityQtypeCustomFieldAuthorization->EntityQtypeCustomField ? $this->objRoleEntityQtypeCustomFieldAuthorization->EntityQtypeCustomField->__toString() : null;
     }
     if ($this->lstAuthorization) {
         $this->lstAuthorization->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstAuthorization->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objAuthorizationArray = Authorization::LoadAll();
         if ($objAuthorizationArray) {
             foreach ($objAuthorizationArray as $objAuthorization) {
                 $objListItem = new QListItem($objAuthorization->__toString(), $objAuthorization->AuthorizationId);
                 if ($this->objRoleEntityQtypeCustomFieldAuthorization->Authorization && $this->objRoleEntityQtypeCustomFieldAuthorization->Authorization->AuthorizationId == $objAuthorization->AuthorizationId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstAuthorization->AddItem($objListItem);
             }
         }
     }
     if ($this->lblAuthorizationId) {
         $this->lblAuthorizationId->Text = $this->objRoleEntityQtypeCustomFieldAuthorization->Authorization ? $this->objRoleEntityQtypeCustomFieldAuthorization->Authorization->__toString() : null;
     }
     if ($this->chkAuthorizedFlag) {
         $this->chkAuthorizedFlag->Checked = $this->objRoleEntityQtypeCustomFieldAuthorization->AuthorizedFlag;
     }
     if ($this->lblAuthorizedFlag) {
         $this->lblAuthorizedFlag->Text = $this->objRoleEntityQtypeCustomFieldAuthorization->AuthorizedFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->lstCreatedByObject) {
         $this->lstCreatedByObject->RemoveAllItems();
         $this->lstCreatedByObject->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreatedByObjectArray = UserAccount::LoadAll();
         if ($objCreatedByObjectArray) {
             foreach ($objCreatedByObjectArray as $objCreatedByObject) {
                 $objListItem = new QListItem($objCreatedByObject->__toString(), $objCreatedByObject->UserAccountId);
                 if ($this->objRoleEntityQtypeCustomFieldAuthorization->CreatedByObject && $this->objRoleEntityQtypeCustomFieldAuthorization->CreatedByObject->UserAccountId == $objCreatedByObject->UserAccountId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreatedByObject->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreatedBy) {
         $this->lblCreatedBy->Text = $this->objRoleEntityQtypeCustomFieldAuthorization->CreatedByObject ? $this->objRoleEntityQtypeCustomFieldAuthorization->CreatedByObject->__toString() : null;
     }
     if ($this->calCreationDate) {
         $this->calCreationDate->DateTime = $this->objRoleEntityQtypeCustomFieldAuthorization->CreationDate;
     }
     if ($this->lblCreationDate) {
         $this->lblCreationDate->Text = sprintf($this->objRoleEntityQtypeCustomFieldAuthorization->CreationDate) ? $this->objRoleEntityQtypeCustomFieldAuthorization->__toString($this->strCreationDateDateTimeFormat) : null;
//.........这里部分代码省略.........
开发者ID:proxymoron,项目名称:tracmor,代码行数:101,代码来源:RoleEntityQtypeCustomFieldAuthorizationMetaControlGen.class.php

示例11: dtgUserAccount_Bind

 public function dtgUserAccount_Bind()
 {
     // Get Total Count b/c of Pagination
     $this->dtgUserAccount->TotalItemCount = UserAccount::CountAll();
     $objClauses = array();
     if ($objClause = $this->dtgUserAccount->OrderByClause) {
         array_push($objClauses, $objClause);
     }
     if ($objClause = $this->dtgUserAccount->LimitClause) {
         array_push($objClauses, $objClause);
     }
     $this->dtgUserAccount->DataSource = UserAccount::LoadAll($objClauses);
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:13,代码来源:UserAccountListPanelBase.class.php

示例12: Refresh

 /**
  * Refresh this MetaControl with Data from the local UserAccount object.
  * @param boolean $blnReload reload UserAccount from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objUserAccount->Reload();
     }
     if ($this->lblUserAccountId) {
         if ($this->blnEditMode) {
             $this->lblUserAccountId->Text = $this->objUserAccount->UserAccountId;
         }
     }
     if ($this->txtFirstName) {
         $this->txtFirstName->Text = $this->objUserAccount->FirstName;
     }
     if ($this->lblFirstName) {
         $this->lblFirstName->Text = $this->objUserAccount->FirstName;
     }
     if ($this->txtLastName) {
         $this->txtLastName->Text = $this->objUserAccount->LastName;
     }
     if ($this->lblLastName) {
         $this->lblLastName->Text = $this->objUserAccount->LastName;
     }
     if ($this->txtUsername) {
         $this->txtUsername->Text = $this->objUserAccount->Username;
     }
     if ($this->lblUsername) {
         $this->lblUsername->Text = $this->objUserAccount->Username;
     }
     if ($this->txtPasswordHash) {
         $this->txtPasswordHash->Text = $this->objUserAccount->PasswordHash;
     }
     if ($this->lblPasswordHash) {
         $this->lblPasswordHash->Text = $this->objUserAccount->PasswordHash;
     }
     if ($this->txtEmailAddress) {
         $this->txtEmailAddress->Text = $this->objUserAccount->EmailAddress;
     }
     if ($this->lblEmailAddress) {
         $this->lblEmailAddress->Text = $this->objUserAccount->EmailAddress;
     }
     if ($this->chkActiveFlag) {
         $this->chkActiveFlag->Checked = $this->objUserAccount->ActiveFlag;
     }
     if ($this->lblActiveFlag) {
         $this->lblActiveFlag->Text = $this->objUserAccount->ActiveFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkAdminFlag) {
         $this->chkAdminFlag->Checked = $this->objUserAccount->AdminFlag;
     }
     if ($this->lblAdminFlag) {
         $this->lblAdminFlag->Text = $this->objUserAccount->AdminFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkPortableAccessFlag) {
         $this->chkPortableAccessFlag->Checked = $this->objUserAccount->PortableAccessFlag;
     }
     if ($this->lblPortableAccessFlag) {
         $this->lblPortableAccessFlag->Text = $this->objUserAccount->PortableAccessFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->txtPortableUserPin) {
         $this->txtPortableUserPin->Text = $this->objUserAccount->PortableUserPin;
     }
     if ($this->lblPortableUserPin) {
         $this->lblPortableUserPin->Text = $this->objUserAccount->PortableUserPin;
     }
     if ($this->lstRole) {
         $this->lstRole->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstRole->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objRoleArray = Role::LoadAll();
         if ($objRoleArray) {
             foreach ($objRoleArray as $objRole) {
                 $objListItem = new QListItem($objRole->__toString(), $objRole->RoleId);
                 if ($this->objUserAccount->Role && $this->objUserAccount->Role->RoleId == $objRole->RoleId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstRole->AddItem($objListItem);
             }
         }
     }
     if ($this->lblRoleId) {
         $this->lblRoleId->Text = $this->objUserAccount->Role ? $this->objUserAccount->Role->__toString() : null;
     }
     if ($this->lstCreatedByObject) {
         $this->lstCreatedByObject->RemoveAllItems();
         $this->lstCreatedByObject->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreatedByObjectArray = UserAccount::LoadAll();
         if ($objCreatedByObjectArray) {
             foreach ($objCreatedByObjectArray as $objCreatedByObject) {
                 $objListItem = new QListItem($objCreatedByObject->__toString(), $objCreatedByObject->UserAccountId);
                 if ($this->objUserAccount->CreatedByObject && $this->objUserAccount->CreatedByObject->UserAccountId == $objCreatedByObject->UserAccountId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreatedByObject->AddItem($objListItem);
             }
//.........这里部分代码省略.........
开发者ID:proxymoron,项目名称:tracmor,代码行数:101,代码来源:UserAccountMetaControlGen.class.php

示例13: Refresh

 /**
  * Refresh this MetaControl with Data from the local Location object.
  * @param boolean $blnReload reload Location from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objLocation->Reload();
     }
     if ($this->lblLocationId) {
         if ($this->blnEditMode) {
             $this->lblLocationId->Text = $this->objLocation->LocationId;
         }
     }
     if ($this->txtShortDescription) {
         $this->txtShortDescription->Text = $this->objLocation->ShortDescription;
     }
     if ($this->lblShortDescription) {
         $this->lblShortDescription->Text = $this->objLocation->ShortDescription;
     }
     if ($this->txtLongDescription) {
         $this->txtLongDescription->Text = $this->objLocation->LongDescription;
     }
     if ($this->lblLongDescription) {
         $this->lblLongDescription->Text = $this->objLocation->LongDescription;
     }
     if ($this->chkEnabledFlag) {
         $this->chkEnabledFlag->Checked = $this->objLocation->EnabledFlag;
     }
     if ($this->lblEnabledFlag) {
         $this->lblEnabledFlag->Text = $this->objLocation->EnabledFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkAssetFlag) {
         $this->chkAssetFlag->Checked = $this->objLocation->AssetFlag;
     }
     if ($this->lblAssetFlag) {
         $this->lblAssetFlag->Text = $this->objLocation->AssetFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkInventoryFlag) {
         $this->chkInventoryFlag->Checked = $this->objLocation->InventoryFlag;
     }
     if ($this->lblInventoryFlag) {
         $this->lblInventoryFlag->Text = $this->objLocation->InventoryFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->lstCreatedByObject) {
         $this->lstCreatedByObject->RemoveAllItems();
         $this->lstCreatedByObject->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreatedByObjectArray = UserAccount::LoadAll();
         if ($objCreatedByObjectArray) {
             foreach ($objCreatedByObjectArray as $objCreatedByObject) {
                 $objListItem = new QListItem($objCreatedByObject->__toString(), $objCreatedByObject->UserAccountId);
                 if ($this->objLocation->CreatedByObject && $this->objLocation->CreatedByObject->UserAccountId == $objCreatedByObject->UserAccountId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreatedByObject->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreatedBy) {
         $this->lblCreatedBy->Text = $this->objLocation->CreatedByObject ? $this->objLocation->CreatedByObject->__toString() : null;
     }
     if ($this->calCreationDate) {
         $this->calCreationDate->DateTime = $this->objLocation->CreationDate;
     }
     if ($this->lblCreationDate) {
         $this->lblCreationDate->Text = sprintf($this->objLocation->CreationDate) ? $this->objLocation->__toString($this->strCreationDateDateTimeFormat) : null;
     }
     if ($this->lstModifiedByObject) {
         $this->lstModifiedByObject->RemoveAllItems();
         $this->lstModifiedByObject->AddItem(QApplication::Translate('- Select One -'), null);
         $objModifiedByObjectArray = UserAccount::LoadAll();
         if ($objModifiedByObjectArray) {
             foreach ($objModifiedByObjectArray as $objModifiedByObject) {
                 $objListItem = new QListItem($objModifiedByObject->__toString(), $objModifiedByObject->UserAccountId);
                 if ($this->objLocation->ModifiedByObject && $this->objLocation->ModifiedByObject->UserAccountId == $objModifiedByObject->UserAccountId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstModifiedByObject->AddItem($objListItem);
             }
         }
     }
     if ($this->lblModifiedBy) {
         $this->lblModifiedBy->Text = $this->objLocation->ModifiedByObject ? $this->objLocation->ModifiedByObject->__toString() : null;
     }
     if ($this->lblModifiedDate) {
         if ($this->blnEditMode) {
             $this->lblModifiedDate->Text = $this->objLocation->ModifiedDate;
         }
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:91,代码来源:LocationMetaControlGen.class.php

示例14: lstUserCheckedOutReserved_Create

 protected function lstUserCheckedOutReserved_Create()
 {
     $this->lstUser = new QListBox($this);
     $this->lstUser->Name = 'User';
     $this->lstUser->AddItem('- Select One -', null);
     $this->lstCheckedOutBy = new QListBox($this);
     $this->lstCheckedOutBy->Name = 'Checked Out By';
     $this->lstCheckedOutBy->AddItem('- Select One -', null);
     //$this->lstCheckedOutBy->AddItem('- Any -', 'any');
     $this->lstReservedBy = new QListBox($this);
     $this->lstReservedBy->Name = 'Reserved By';
     $this->lstReservedBy->AddItem('- Select One -', null);
     //$this->lstReservedBy->AddItem('- Any -', 'any');
     foreach (UserAccount::LoadAll(QQ::Clause(QQ::OrderBy(QQN::UserAccount()->Username))) as $objUserAccount) {
         $this->lstUser->AddItem($objUserAccount->Username, $objUserAccount->UserAccountId);
         $this->lstCheckedOutBy->AddItem($objUserAccount->Username, $objUserAccount->UserAccountId);
         $this->lstReservedBy->AddItem($objUserAccount->Username, $objUserAccount->UserAccountId);
     }
 }
开发者ID:brustj,项目名称:tracmor,代码行数:19,代码来源:asset_transaction_report.php

示例15: Refresh

 /**
  * Refresh this MetaControl with Data from the local Address object.
  * @param boolean $blnReload reload Address from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objAddress->Reload();
     }
     if ($this->lblAddressId) {
         if ($this->blnEditMode) {
             $this->lblAddressId->Text = $this->objAddress->AddressId;
         }
     }
     if ($this->lstCompany) {
         $this->lstCompany->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstCompany->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objCompanyArray = Company::LoadAll();
         if ($objCompanyArray) {
             foreach ($objCompanyArray as $objCompany) {
                 $objListItem = new QListItem($objCompany->__toString(), $objCompany->CompanyId);
                 if ($this->objAddress->Company && $this->objAddress->Company->CompanyId == $objCompany->CompanyId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCompany->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCompanyId) {
         $this->lblCompanyId->Text = $this->objAddress->Company ? $this->objAddress->Company->__toString() : null;
     }
     if ($this->txtShortDescription) {
         $this->txtShortDescription->Text = $this->objAddress->ShortDescription;
     }
     if ($this->lblShortDescription) {
         $this->lblShortDescription->Text = $this->objAddress->ShortDescription;
     }
     if ($this->lstCountry) {
         $this->lstCountry->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstCountry->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objCountryArray = Country::LoadAll();
         if ($objCountryArray) {
             foreach ($objCountryArray as $objCountry) {
                 $objListItem = new QListItem($objCountry->__toString(), $objCountry->CountryId);
                 if ($this->objAddress->Country && $this->objAddress->Country->CountryId == $objCountry->CountryId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCountry->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCountryId) {
         $this->lblCountryId->Text = $this->objAddress->Country ? $this->objAddress->Country->__toString() : null;
     }
     if ($this->txtAddress1) {
         $this->txtAddress1->Text = $this->objAddress->Address1;
     }
     if ($this->lblAddress1) {
         $this->lblAddress1->Text = $this->objAddress->Address1;
     }
     if ($this->txtAddress2) {
         $this->txtAddress2->Text = $this->objAddress->Address2;
     }
     if ($this->lblAddress2) {
         $this->lblAddress2->Text = $this->objAddress->Address2;
     }
     if ($this->txtCity) {
         $this->txtCity->Text = $this->objAddress->City;
     }
     if ($this->lblCity) {
         $this->lblCity->Text = $this->objAddress->City;
     }
     if ($this->lstStateProvince) {
         $this->lstStateProvince->RemoveAllItems();
         $this->lstStateProvince->AddItem(QApplication::Translate('- Select One -'), null);
         $objStateProvinceArray = StateProvince::LoadAll();
         if ($objStateProvinceArray) {
             foreach ($objStateProvinceArray as $objStateProvince) {
                 $objListItem = new QListItem($objStateProvince->__toString(), $objStateProvince->StateProvinceId);
                 if ($this->objAddress->StateProvince && $this->objAddress->StateProvince->StateProvinceId == $objStateProvince->StateProvinceId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstStateProvince->AddItem($objListItem);
             }
         }
     }
     if ($this->lblStateProvinceId) {
         $this->lblStateProvinceId->Text = $this->objAddress->StateProvince ? $this->objAddress->StateProvince->__toString() : null;
     }
     if ($this->txtPostalCode) {
         $this->txtPostalCode->Text = $this->objAddress->PostalCode;
     }
     if ($this->lblPostalCode) {
         $this->lblPostalCode->Text = $this->objAddress->PostalCode;
     }
//.........这里部分代码省略.........
开发者ID:proxymoron,项目名称:tracmor,代码行数:101,代码来源:AddressMetaControlGen.class.php


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