本文整理汇总了PHP中Shipment::LoadAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Shipment::LoadAll方法的具体用法?PHP Shipment::LoadAll怎么用?PHP Shipment::LoadAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shipment
的用法示例。
在下文中一共展示了Shipment::LoadAll方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lstShipment_Create
protected function lstShipment_Create()
{
$this->lstShipment = new QListBox($this);
$this->lstShipment->Name = QApplication::Translate('Shipment');
$this->lstShipment->AddItem(QApplication::Translate('- Select One -'), null);
$objShipmentArray = Shipment::LoadAll();
if ($objShipmentArray) {
foreach ($objShipmentArray as $objShipment) {
$objListItem = new QListItem($objShipment->__toString(), $objShipment->ShipmentId);
if ($objShipment->TransactionId == $this->objTransaction->TransactionId) {
$objListItem->Selected = true;
}
$this->lstShipment->AddItem($objListItem);
}
}
// Because Shipment's Shipment is not null, if a value is already selected, it cannot be changed.
if ($this->lstShipment->SelectedValue) {
$this->lstShipment->Enabled = false;
}
}
示例2: dtgShipment_Bind
public function dtgShipment_Bind()
{
// Get Total Count b/c of Pagination
$this->dtgShipment->TotalItemCount = Shipment::CountAll();
$objClauses = array();
if ($objClause = $this->dtgShipment->OrderByClause) {
array_push($objClauses, $objClause);
}
if ($objClause = $this->dtgShipment->LimitClause) {
array_push($objClauses, $objClause);
}
$this->dtgShipment->DataSource = Shipment::LoadAll($objClauses);
}
示例3: Refresh
/**
* Refresh this MetaControl with Data from the local ShipmentCustomFieldHelper object.
* @param boolean $blnReload reload ShipmentCustomFieldHelper from the database
* @return void
*/
public function Refresh($blnReload = false)
{
if ($blnReload) {
$this->objShipmentCustomFieldHelper->Reload();
}
if ($this->lstShipment) {
$this->lstShipment->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstShipment->AddItem(QApplication::Translate('- Select One -'), null);
}
$objShipmentArray = Shipment::LoadAll();
if ($objShipmentArray) {
foreach ($objShipmentArray as $objShipment) {
$objListItem = new QListItem($objShipment->__toString(), $objShipment->ShipmentId);
if ($this->objShipmentCustomFieldHelper->Shipment && $this->objShipmentCustomFieldHelper->Shipment->ShipmentId == $objShipment->ShipmentId) {
$objListItem->Selected = true;
}
$this->lstShipment->AddItem($objListItem);
}
}
}
if ($this->lblShipmentId) {
$this->lblShipmentId->Text = $this->objShipmentCustomFieldHelper->Shipment ? $this->objShipmentCustomFieldHelper->Shipment->__toString() : null;
}
}
示例4: dtgShipment_Bind
protected function dtgShipment_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->dtgShipment->TotalItemCount = Shipment::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->dtgShipment->OrderByClause) {
array_push($objClauses, $objClause);
}
// Add the LimitClause information, as well
if ($objClause = $this->dtgShipment->LimitClause) {
array_push($objClauses, $objClause);
}
// Set the DataSource to be the array of all Shipment objects, given the clauses above
$this->dtgShipment->DataSource = Shipment::LoadAll($objClauses);
}
示例5: lstShipment_Create
protected function lstShipment_Create()
{
$this->lstShipment = new QListBox($this);
$this->lstShipment->Name = QApplication::Translate('Shipment');
$this->lstShipment->Required = true;
if (!$this->blnEditMode) {
$this->lstShipment->AddItem(QApplication::Translate('- Select One -'), null);
}
$objShipmentArray = Shipment::LoadAll();
if ($objShipmentArray) {
foreach ($objShipmentArray as $objShipment) {
$objListItem = new QListItem($objShipment->__toString(), $objShipment->ShipmentId);
if ($this->objFedexShipment->Shipment && $this->objFedexShipment->Shipment->ShipmentId == $objShipment->ShipmentId) {
$objListItem->Selected = true;
}
$this->lstShipment->AddItem($objListItem);
}
}
}
示例6: 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;
//.........这里部分代码省略.........