本文整理汇总了PHP中Contact::LoadAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Contact::LoadAll方法的具体用法?PHP Contact::LoadAll怎么用?PHP Contact::LoadAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contact
的用法示例。
在下文中一共展示了Contact::LoadAll方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lstToContact_Create
protected function lstToContact_Create()
{
$this->lstToContact = new QListBox($this);
$this->lstToContact->Name = QApplication::Translate('To Contact');
$this->lstToContact->Required = true;
if (!$this->blnEditMode) {
$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->objShipment->ToContact && $this->objShipment->ToContact->ContactId == $objToContact->ContactId) {
$objListItem->Selected = true;
}
$this->lstToContact->AddItem($objListItem);
}
}
}
示例2: Refresh
/**
* Refresh this MetaControl with Data from the local Shipment object.
* @param boolean $blnReload reload Shipment from the database
* @return void
*/
public function Refresh($blnReload = false)
{
if ($blnReload) {
$this->objShipment->Reload();
}
if ($this->lblShipmentId) {
if ($this->blnEditMode) {
$this->lblShipmentId->Text = $this->objShipment->ShipmentId;
}
}
if ($this->txtShipmentNumber) {
$this->txtShipmentNumber->Text = $this->objShipment->ShipmentNumber;
}
if ($this->lblShipmentNumber) {
$this->lblShipmentNumber->Text = $this->objShipment->ShipmentNumber;
}
if ($this->lstTransaction) {
$this->lstTransaction->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstTransaction->AddItem(QApplication::Translate('- Select One -'), null);
}
$objTransactionArray = Transaction::LoadAll();
if ($objTransactionArray) {
foreach ($objTransactionArray as $objTransaction) {
$objListItem = new QListItem($objTransaction->__toString(), $objTransaction->TransactionId);
if ($this->objShipment->Transaction && $this->objShipment->Transaction->TransactionId == $objTransaction->TransactionId) {
$objListItem->Selected = true;
}
$this->lstTransaction->AddItem($objListItem);
}
}
}
if ($this->lblTransactionId) {
$this->lblTransactionId->Text = $this->objShipment->Transaction ? $this->objShipment->Transaction->__toString() : null;
}
if ($this->lstFromCompany) {
$this->lstFromCompany->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstFromCompany->AddItem(QApplication::Translate('- Select One -'), null);
}
$objFromCompanyArray = Company::LoadAll();
if ($objFromCompanyArray) {
foreach ($objFromCompanyArray as $objFromCompany) {
$objListItem = new QListItem($objFromCompany->__toString(), $objFromCompany->CompanyId);
if ($this->objShipment->FromCompany && $this->objShipment->FromCompany->CompanyId == $objFromCompany->CompanyId) {
$objListItem->Selected = true;
}
$this->lstFromCompany->AddItem($objListItem);
}
}
}
if ($this->lblFromCompanyId) {
$this->lblFromCompanyId->Text = $this->objShipment->FromCompany ? $this->objShipment->FromCompany->__toString() : null;
}
if ($this->lstFromContact) {
$this->lstFromContact->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstFromContact->AddItem(QApplication::Translate('- Select One -'), null);
}
$objFromContactArray = Contact::LoadAll();
if ($objFromContactArray) {
foreach ($objFromContactArray as $objFromContact) {
$objListItem = new QListItem($objFromContact->__toString(), $objFromContact->ContactId);
if ($this->objShipment->FromContact && $this->objShipment->FromContact->ContactId == $objFromContact->ContactId) {
$objListItem->Selected = true;
}
$this->lstFromContact->AddItem($objListItem);
}
}
}
if ($this->lblFromContactId) {
$this->lblFromContactId->Text = $this->objShipment->FromContact ? $this->objShipment->FromContact->__toString() : null;
}
if ($this->lstFromAddress) {
$this->lstFromAddress->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstFromAddress->AddItem(QApplication::Translate('- Select One -'), null);
}
$objFromAddressArray = Address::LoadAll();
if ($objFromAddressArray) {
foreach ($objFromAddressArray as $objFromAddress) {
$objListItem = new QListItem($objFromAddress->__toString(), $objFromAddress->AddressId);
if ($this->objShipment->FromAddress && $this->objShipment->FromAddress->AddressId == $objFromAddress->AddressId) {
$objListItem->Selected = true;
}
$this->lstFromAddress->AddItem($objListItem);
}
}
}
if ($this->lblFromAddressId) {
$this->lblFromAddressId->Text = $this->objShipment->FromAddress ? $this->objShipment->FromAddress->__toString() : null;
}
if ($this->lstToCompany) {
$this->lstToCompany->RemoveAllItems();
if (!$this->blnEditMode) {
//.........这里部分代码省略.........
示例3: btnNext_Click
//.........这里部分代码省略.........
$lstDefaultValue->Width = 200;
$lstDefaultValue->Display = false;
$this->lstMapDefaultValueArray[] = $lstDefaultValue;
$dtpDate = new QDateTimePicker($this);
$dtpDate->DateTimePickerType = QDateTimePickerType::Date;
$dtpDate->DateTimePickerFormat = QDateTimePickerFormat::MonthDayYear;
$dtpDate->Display = false;
$this->dtpDateArray[] = $dtpDate;
if (array_key_exists($i, $this->lstMapHeaderArray)) {
$this->lstTramorField_Change(null, $this->lstMapHeaderArray[$i]->ControlId, null);
}
}
$this->arrMapFields[$i]['row1'] = $strFirstRowArray[$i];
}
$this->btnNext->Text = "Import Now";
fclose($file_skipped);
// Create Add Field button
$btnAddField = new QButton($this);
$btnAddField->Text = "Add Field";
$btnAddField->AddAction(new QClickEvent(), new QServerAction('btnAddField_Click'));
$btnAddField->AddAction(new QEnterKeyEvent(), new QServerAction('btnAddField_Click'));
$btnAddField->AddAction(new QEnterKeyEvent(), new QTerminateAction());
$this->lstMapHeaderArray[] = $btnAddField;
}
}
}
} elseif ($this->intStep == 2) {
// Step 2 complete
$blnError = false;
$blnCompany = false;
$blnLastName = false;
$blnContactId = false;
$this->intCompanyArray = array();
foreach (Company::LoadAll() as $objCompany) {
$this->intCompanyArray[strtolower($objCompany->ShortDescription)] = $objCompany->CompanyId;
}
for ($i = 0; $i < count($this->lstMapHeaderArray) - 1; $i++) {
$lstMapHeader = $this->lstMapHeaderArray[$i];
$strSelectedValue = strtolower($lstMapHeader->SelectedValue);
if ($strSelectedValue == "company") {
$blnCompany = true;
}
if ($strSelectedValue == "last name") {
$blnLastName = true;
} elseif ($strSelectedValue == "id") {
$blnContactId = true;
}
}
if ($this->lstMapDefaultValueArray) {
// Checking errors for required Default Value text fields
foreach ($this->lstMapDefaultValueArray as $lstDefault) {
if ($lstDefault->Display && $lstDefault->Required && !$lstDefault->SelectedValue) {
$lstDefault->Warning = "You must select one default value.";
$blnError = true;
break;
} else {
$blnError = false;
$lstDefault->Warning = "";
}
}
}
if ($this->txtMapDefaultValueArray) {
// Checking errors for required Default Value lst fields
foreach ($this->txtMapDefaultValueArray as $txtDefault) {
if ($txtDefault->Display && $txtDefault->Required && !$txtDefault->Text) {
$txtDefault->Warning = "You must enter default value.";
示例4: lstToContact_Create
protected function lstToContact_Create()
{
$this->lstToContact = new QListBox($this);
$this->lstToContact->Name = QApplication::Translate('To Contact');
$this->lstToContact->Required = true;
if (!$this->blnEditMode) {
$this->lstToContact->AddItem('- Select One -', null);
} elseif ($this->blnEditMode && $this->lstToCompany->SelectedValue) {
$this->lstToContact->Enabled = true;
$this->lstToCompany_Select();
} else {
$this->lstToContact->AddItem('- Select One -', null);
$objToContactArray = Contact::LoadAll(QQ::Clause(QQ::OrderBy(QQN::Contact()->LastName), QQ::OrderBy(QQN::Contact()->FirstName)));
if ($objToContactArray) {
foreach ($objToContactArray as $objToContact) {
$objListItem = new QListItem($objToContact->__toString(), $objToContact->ContactId);
if ($this->objShipment->ToContactId && $this->objShipment->ToContactId == $objToContact->ContactId) {
$objListItem->Selected = true;
}
$this->lstToContact->AddItem($objListItem);
}
}
}
// $this->lstToContact->AddAction(new QChangeEvent(), new QAjaxAction('lstToContact_Select'));
$this->lstToContact->TabIndex = 5;
}
示例5: 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);
//.........这里部分代码省略.........
示例6: dtgContact_Bind
public function dtgContact_Bind()
{
// Get Total Count b/c of Pagination
$this->dtgContact->TotalItemCount = Contact::CountAll();
$objClauses = array();
if ($objClause = $this->dtgContact->OrderByClause) {
array_push($objClauses, $objClause);
}
if ($objClause = $this->dtgContact->LimitClause) {
array_push($objClauses, $objClause);
}
$this->dtgContact->DataSource = Contact::LoadAll($objClauses);
}
示例7: Refresh
/**
* Refresh this MetaControl with Data from the local ContactCustomFieldHelper object.
* @param boolean $blnReload reload ContactCustomFieldHelper from the database
* @return void
*/
public function Refresh($blnReload = false)
{
if ($blnReload) {
$this->objContactCustomFieldHelper->Reload();
}
if ($this->lstContact) {
$this->lstContact->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstContact->AddItem(QApplication::Translate('- Select One -'), null);
}
$objContactArray = Contact::LoadAll();
if ($objContactArray) {
foreach ($objContactArray as $objContact) {
$objListItem = new QListItem($objContact->__toString(), $objContact->ContactId);
if ($this->objContactCustomFieldHelper->Contact && $this->objContactCustomFieldHelper->Contact->ContactId == $objContact->ContactId) {
$objListItem->Selected = true;
}
$this->lstContact->AddItem($objListItem);
}
}
}
if ($this->lblContactId) {
$this->lblContactId->Text = $this->objContactCustomFieldHelper->Contact ? $this->objContactCustomFieldHelper->Contact->__toString() : null;
}
}
示例8: dtgContact_Bind
protected function dtgContact_Bind()
{
// Because we want to enable pagination AND sorting, we need to setup the $objClauses array to send to LoadAll()
// Remember! We need to first set the TotalItemCount, which will affect the calcuation of LimitClause below
$this->dtgContact->TotalItemCount = Contact::CountAll();
// 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->dtgContact->OrderByClause) {
array_push($objClauses, $objClause);
}
// Add the LimitClause information, as well
if ($objClause = $this->dtgContact->LimitClause) {
array_push($objClauses, $objClause);
}
// Set the DataSource to be the array of all Contact objects, given the clauses above
$this->dtgContact->DataSource = Contact::LoadAll($objClauses);
}