本文整理汇总了PHP中Location::LoadAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Location::LoadAll方法的具体用法?PHP Location::LoadAll怎么用?PHP Location::LoadAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Location
的用法示例。
在下文中一共展示了Location::LoadAll方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: btnNext_Click
//.........这里部分代码省略.........
if ($txtDefault->Display && $txtDefault->Required && !$txtDefault->Text) {
$txtDefault->Warning = "You must enter default value.";
break;
} else {
$blnError = false;
$txtDefault->Warning = "";
}
}
}
// If all required fields have no errors
if (!$blnError && $blnAssetCode && $blnAssetModelCode && $blnAssetModelShortDescription && $blnLocation && $blnCategory && $blnManufacturer) {
$this->btnNext->Warning = "";
// Setup keys for main required fields
foreach ($this->arrTracmorField as $key => $value) {
if ($value == 'location') {
$this->intLocationKey = $key;
} elseif ($value == 'category') {
$this->intCategoryKey = $key;
} elseif ($value == 'manufacturer') {
$this->intManufacturerKey = $key;
} elseif ($value == 'created by') {
$this->intCreatedByKey = $key;
} elseif ($value == 'created date') {
$this->intCreatedDateKey = $key;
} elseif ($value == 'modified by') {
$this->intModifiedByKey = $key;
} elseif ($value == 'modified date') {
$this->intModifiedDateKey = $key;
}
}
$strLocationArray = array();
$strNewLocationArray = array();
// Load all locations
foreach (Location::LoadAll() as $objLocation) {
$strLocationArray[] = stripslashes($objLocation->ShortDescription);
}
$txtDefaultValue = trim($this->txtMapDefaultValueArray[$this->intLocationKey]->Text);
// Add default value in database if it is not exist
if ($txtDefaultValue && !$this->in_array_nocase($txtDefaultValue, $strLocationArray)) {
$strLocationArray[] = $txtDefaultValue;
$objNewLocation = new Location();
$objNewLocation->ShortDescription = addslashes($txtDefaultValue);
$objNewLocation->EnabledFlag = 1;
$objNewLocation->Save();
$this->objNewLocationArray[$objNewLocation->LocationId] = $objNewLocation->ShortDescription;
}
$this->objNewLocationArray = array();
$this->objNewCategoryArray = array();
$this->objNewManufacturerArray = array();
$this->objNewAssetModelArray = array();
$this->strModelValuesArray = array();
$this->blnImportEnd = false;
$j = 1;
$strLocationValuesArray = array();
// Add all unique locations in database
foreach ($this->strFilePathArray as $strFilePath) {
$this->FileCsvData->load($strFilePath);
if ($j != 1) {
//$this->FileCsvData->appendRow($this->FileCsvData->getHeaders());
}
// Location Import
for ($i = 0; $i < $this->FileCsvData->countRows(); $i++) {
$strRowArray = $this->FileCsvData->getRow($i);
if (trim($strRowArray[$this->intLocationKey]) && !$this->in_array_nocase(trim($strRowArray[$this->intLocationKey]), $strLocationArray)) {
$strLocationArray[] = trim($strRowArray[$this->intLocationKey]);
/*$objNewLocation = new Location();
示例2: lstDestinationLocation_Create
protected function lstDestinationLocation_Create()
{
$this->lstDestinationLocation = new QListBox($this);
$this->lstDestinationLocation->Name = QApplication::Translate('Destination Location');
$this->lstDestinationLocation->AddItem(QApplication::Translate('- Select One -'), null);
$objDestinationLocationArray = Location::LoadAll();
if ($objDestinationLocationArray) {
foreach ($objDestinationLocationArray as $objDestinationLocation) {
$objListItem = new QListItem($objDestinationLocation->__toString(), $objDestinationLocation->LocationId);
if ($this->objInventoryTransaction->DestinationLocation && $this->objInventoryTransaction->DestinationLocation->LocationId == $objDestinationLocation->LocationId) {
$objListItem->Selected = true;
}
$this->lstDestinationLocation->AddItem($objListItem);
}
}
}
示例3: lstLocation_Create
protected function lstLocation_Create()
{
$this->lstLocation = new QListBox($this);
$this->lstLocation->Name = QApplication::Translate('Location');
$this->lstLocation->Required = true;
if (!$this->blnEditMode) {
$this->lstLocation->AddItem(QApplication::Translate('- Select One -'), null);
}
$objLocationArray = Location::LoadAll();
if ($objLocationArray) {
foreach ($objLocationArray as $objLocation) {
$objListItem = new QListItem($objLocation->__toString(), $objLocation->LocationId);
if ($this->objAuditScan->Location && $this->objAuditScan->Location->LocationId == $objLocation->LocationId) {
$objListItem->Selected = true;
}
$this->lstLocation->AddItem($objListItem);
}
}
}
示例4: Refresh
/**
* Refresh this MetaControl with Data from the local AuditScan object.
* @param boolean $blnReload reload AuditScan from the database
* @return void
*/
public function Refresh($blnReload = false)
{
if ($blnReload) {
$this->objAuditScan->Reload();
}
if ($this->lblAuditScanId) {
if ($this->blnEditMode) {
$this->lblAuditScanId->Text = $this->objAuditScan->AuditScanId;
}
}
if ($this->lstAudit) {
$this->lstAudit->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstAudit->AddItem(QApplication::Translate('- Select One -'), null);
}
$objAuditArray = Audit::LoadAll();
if ($objAuditArray) {
foreach ($objAuditArray as $objAudit) {
$objListItem = new QListItem($objAudit->__toString(), $objAudit->AuditId);
if ($this->objAuditScan->Audit && $this->objAuditScan->Audit->AuditId == $objAudit->AuditId) {
$objListItem->Selected = true;
}
$this->lstAudit->AddItem($objListItem);
}
}
}
if ($this->lblAuditId) {
$this->lblAuditId->Text = $this->objAuditScan->Audit ? $this->objAuditScan->Audit->__toString() : null;
}
if ($this->lstLocation) {
$this->lstLocation->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstLocation->AddItem(QApplication::Translate('- Select One -'), null);
}
$objLocationArray = Location::LoadAll();
if ($objLocationArray) {
foreach ($objLocationArray as $objLocation) {
$objListItem = new QListItem($objLocation->__toString(), $objLocation->LocationId);
if ($this->objAuditScan->Location && $this->objAuditScan->Location->LocationId == $objLocation->LocationId) {
$objListItem->Selected = true;
}
$this->lstLocation->AddItem($objListItem);
}
}
}
if ($this->lblLocationId) {
$this->lblLocationId->Text = $this->objAuditScan->Location ? $this->objAuditScan->Location->__toString() : null;
}
if ($this->txtEntityId) {
$this->txtEntityId->Text = $this->objAuditScan->EntityId;
}
if ($this->lblEntityId) {
$this->lblEntityId->Text = $this->objAuditScan->EntityId;
}
if ($this->txtCount) {
$this->txtCount->Text = $this->objAuditScan->Count;
}
if ($this->lblCount) {
$this->lblCount->Text = $this->objAuditScan->Count;
}
if ($this->txtSystemCount) {
$this->txtSystemCount->Text = $this->objAuditScan->SystemCount;
}
if ($this->lblSystemCount) {
$this->lblSystemCount->Text = $this->objAuditScan->SystemCount;
}
}
示例5: Refresh
/**
* Refresh this MetaControl with Data from the local InventoryTransaction object.
* @param boolean $blnReload reload InventoryTransaction from the database
* @return void
*/
public function Refresh($blnReload = false)
{
if ($blnReload) {
$this->objInventoryTransaction->Reload();
}
if ($this->lblInventoryTransactionId) {
if ($this->blnEditMode) {
$this->lblInventoryTransactionId->Text = $this->objInventoryTransaction->InventoryTransactionId;
}
}
if ($this->lstInventoryLocation) {
$this->lstInventoryLocation->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstInventoryLocation->AddItem(QApplication::Translate('- Select One -'), null);
}
$objInventoryLocationArray = InventoryLocation::LoadAll();
if ($objInventoryLocationArray) {
foreach ($objInventoryLocationArray as $objInventoryLocation) {
$objListItem = new QListItem($objInventoryLocation->__toString(), $objInventoryLocation->InventoryLocationId);
if ($this->objInventoryTransaction->InventoryLocation && $this->objInventoryTransaction->InventoryLocation->InventoryLocationId == $objInventoryLocation->InventoryLocationId) {
$objListItem->Selected = true;
}
$this->lstInventoryLocation->AddItem($objListItem);
}
}
}
if ($this->lblInventoryLocationId) {
$this->lblInventoryLocationId->Text = $this->objInventoryTransaction->InventoryLocation ? $this->objInventoryTransaction->InventoryLocation->__toString() : null;
}
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->objInventoryTransaction->Transaction && $this->objInventoryTransaction->Transaction->TransactionId == $objTransaction->TransactionId) {
$objListItem->Selected = true;
}
$this->lstTransaction->AddItem($objListItem);
}
}
}
if ($this->lblTransactionId) {
$this->lblTransactionId->Text = $this->objInventoryTransaction->Transaction ? $this->objInventoryTransaction->Transaction->__toString() : null;
}
if ($this->txtQuantity) {
$this->txtQuantity->Text = $this->objInventoryTransaction->Quantity;
}
if ($this->lblQuantity) {
$this->lblQuantity->Text = $this->objInventoryTransaction->Quantity;
}
if ($this->lstSourceLocation) {
$this->lstSourceLocation->RemoveAllItems();
$this->lstSourceLocation->AddItem(QApplication::Translate('- Select One -'), null);
$objSourceLocationArray = Location::LoadAll();
if ($objSourceLocationArray) {
foreach ($objSourceLocationArray as $objSourceLocation) {
$objListItem = new QListItem($objSourceLocation->__toString(), $objSourceLocation->LocationId);
if ($this->objInventoryTransaction->SourceLocation && $this->objInventoryTransaction->SourceLocation->LocationId == $objSourceLocation->LocationId) {
$objListItem->Selected = true;
}
$this->lstSourceLocation->AddItem($objListItem);
}
}
}
if ($this->lblSourceLocationId) {
$this->lblSourceLocationId->Text = $this->objInventoryTransaction->SourceLocation ? $this->objInventoryTransaction->SourceLocation->__toString() : null;
}
if ($this->lstDestinationLocation) {
$this->lstDestinationLocation->RemoveAllItems();
$this->lstDestinationLocation->AddItem(QApplication::Translate('- Select One -'), null);
$objDestinationLocationArray = Location::LoadAll();
if ($objDestinationLocationArray) {
foreach ($objDestinationLocationArray as $objDestinationLocation) {
$objListItem = new QListItem($objDestinationLocation->__toString(), $objDestinationLocation->LocationId);
if ($this->objInventoryTransaction->DestinationLocation && $this->objInventoryTransaction->DestinationLocation->LocationId == $objDestinationLocation->LocationId) {
$objListItem->Selected = true;
}
$this->lstDestinationLocation->AddItem($objListItem);
}
}
}
if ($this->lblDestinationLocationId) {
$this->lblDestinationLocationId->Text = $this->objInventoryTransaction->DestinationLocation ? $this->objInventoryTransaction->DestinationLocation->__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);
//.........这里部分代码省略.........
示例6: Refresh
/**
* Refresh this MetaControl with Data from the local Asset object.
* @param boolean $blnReload reload Asset from the database
* @return void
*/
public function Refresh($blnReload = false)
{
if ($blnReload) {
$this->objAsset->Reload();
}
if ($this->lblAssetId) {
if ($this->blnEditMode) {
$this->lblAssetId->Text = $this->objAsset->AssetId;
}
}
if ($this->lstParentAsset) {
$this->lstParentAsset->RemoveAllItems();
$this->lstParentAsset->AddItem(QApplication::Translate('- Select One -'), null);
$objParentAssetArray = Asset::LoadAll();
if ($objParentAssetArray) {
foreach ($objParentAssetArray as $objParentAsset) {
$objListItem = new QListItem($objParentAsset->__toString(), $objParentAsset->AssetId);
if ($this->objAsset->ParentAsset && $this->objAsset->ParentAsset->AssetId == $objParentAsset->AssetId) {
$objListItem->Selected = true;
}
$this->lstParentAsset->AddItem($objListItem);
}
}
}
if ($this->lblParentAssetId) {
$this->lblParentAssetId->Text = $this->objAsset->ParentAsset ? $this->objAsset->ParentAsset->__toString() : null;
}
if ($this->lstAssetModel) {
$this->lstAssetModel->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstAssetModel->AddItem(QApplication::Translate('- Select One -'), null);
}
$objAssetModelArray = AssetModel::LoadAll();
if ($objAssetModelArray) {
foreach ($objAssetModelArray as $objAssetModel) {
$objListItem = new QListItem($objAssetModel->__toString(), $objAssetModel->AssetModelId);
if ($this->objAsset->AssetModel && $this->objAsset->AssetModel->AssetModelId == $objAssetModel->AssetModelId) {
$objListItem->Selected = true;
}
$this->lstAssetModel->AddItem($objListItem);
}
}
}
if ($this->lblAssetModelId) {
$this->lblAssetModelId->Text = $this->objAsset->AssetModel ? $this->objAsset->AssetModel->__toString() : null;
}
if ($this->lstLocation) {
$this->lstLocation->RemoveAllItems();
$this->lstLocation->AddItem(QApplication::Translate('- Select One -'), null);
$objLocationArray = Location::LoadAll();
if ($objLocationArray) {
foreach ($objLocationArray as $objLocation) {
$objListItem = new QListItem($objLocation->__toString(), $objLocation->LocationId);
if ($this->objAsset->Location && $this->objAsset->Location->LocationId == $objLocation->LocationId) {
$objListItem->Selected = true;
}
$this->lstLocation->AddItem($objListItem);
}
}
}
if ($this->lblLocationId) {
$this->lblLocationId->Text = $this->objAsset->Location ? $this->objAsset->Location->__toString() : null;
}
if ($this->txtAssetCode) {
$this->txtAssetCode->Text = $this->objAsset->AssetCode;
}
if ($this->lblAssetCode) {
$this->lblAssetCode->Text = $this->objAsset->AssetCode;
}
if ($this->txtImagePath) {
$this->txtImagePath->Text = $this->objAsset->ImagePath;
}
if ($this->lblImagePath) {
$this->lblImagePath->Text = $this->objAsset->ImagePath;
}
if ($this->chkCheckedOutFlag) {
$this->chkCheckedOutFlag->Checked = $this->objAsset->CheckedOutFlag;
}
if ($this->lblCheckedOutFlag) {
$this->lblCheckedOutFlag->Text = $this->objAsset->CheckedOutFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
}
if ($this->chkReservedFlag) {
$this->chkReservedFlag->Checked = $this->objAsset->ReservedFlag;
}
if ($this->lblReservedFlag) {
$this->lblReservedFlag->Text = $this->objAsset->ReservedFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
}
if ($this->chkLinkedFlag) {
$this->chkLinkedFlag->Checked = $this->objAsset->LinkedFlag;
}
if ($this->lblLinkedFlag) {
$this->lblLinkedFlag->Text = $this->objAsset->LinkedFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
}
if ($this->chkArchivedFlag) {
$this->chkArchivedFlag->Checked = $this->objAsset->ArchivedFlag;
//.........这里部分代码省略.........
示例7: Refresh
/**
* Refresh this MetaControl with Data from the local AssetTransaction object.
* @param boolean $blnReload reload AssetTransaction from the database
* @return void
*/
public function Refresh($blnReload = false)
{
if ($blnReload) {
$this->objAssetTransaction->Reload();
}
if ($this->lblAssetTransactionId) {
if ($this->blnEditMode) {
$this->lblAssetTransactionId->Text = $this->objAssetTransaction->AssetTransactionId;
}
}
if ($this->lstAsset) {
$this->lstAsset->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstAsset->AddItem(QApplication::Translate('- Select One -'), null);
}
$objAssetArray = Asset::LoadAll();
if ($objAssetArray) {
foreach ($objAssetArray as $objAsset) {
$objListItem = new QListItem($objAsset->__toString(), $objAsset->AssetId);
if ($this->objAssetTransaction->Asset && $this->objAssetTransaction->Asset->AssetId == $objAsset->AssetId) {
$objListItem->Selected = true;
}
$this->lstAsset->AddItem($objListItem);
}
}
}
if ($this->lblAssetId) {
$this->lblAssetId->Text = $this->objAssetTransaction->Asset ? $this->objAssetTransaction->Asset->__toString() : null;
}
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->objAssetTransaction->Transaction && $this->objAssetTransaction->Transaction->TransactionId == $objTransaction->TransactionId) {
$objListItem->Selected = true;
}
$this->lstTransaction->AddItem($objListItem);
}
}
}
if ($this->lblTransactionId) {
$this->lblTransactionId->Text = $this->objAssetTransaction->Transaction ? $this->objAssetTransaction->Transaction->__toString() : null;
}
if ($this->lstParentAssetTransaction) {
$this->lstParentAssetTransaction->RemoveAllItems();
$this->lstParentAssetTransaction->AddItem(QApplication::Translate('- Select One -'), null);
$objParentAssetTransactionArray = AssetTransaction::LoadAll();
if ($objParentAssetTransactionArray) {
foreach ($objParentAssetTransactionArray as $objParentAssetTransaction) {
$objListItem = new QListItem($objParentAssetTransaction->__toString(), $objParentAssetTransaction->AssetTransactionId);
if ($this->objAssetTransaction->ParentAssetTransaction && $this->objAssetTransaction->ParentAssetTransaction->AssetTransactionId == $objParentAssetTransaction->AssetTransactionId) {
$objListItem->Selected = true;
}
$this->lstParentAssetTransaction->AddItem($objListItem);
}
}
}
if ($this->lblParentAssetTransactionId) {
$this->lblParentAssetTransactionId->Text = $this->objAssetTransaction->ParentAssetTransaction ? $this->objAssetTransaction->ParentAssetTransaction->__toString() : null;
}
if ($this->lstSourceLocation) {
$this->lstSourceLocation->RemoveAllItems();
$this->lstSourceLocation->AddItem(QApplication::Translate('- Select One -'), null);
$objSourceLocationArray = Location::LoadAll();
if ($objSourceLocationArray) {
foreach ($objSourceLocationArray as $objSourceLocation) {
$objListItem = new QListItem($objSourceLocation->__toString(), $objSourceLocation->LocationId);
if ($this->objAssetTransaction->SourceLocation && $this->objAssetTransaction->SourceLocation->LocationId == $objSourceLocation->LocationId) {
$objListItem->Selected = true;
}
$this->lstSourceLocation->AddItem($objListItem);
}
}
}
if ($this->lblSourceLocationId) {
$this->lblSourceLocationId->Text = $this->objAssetTransaction->SourceLocation ? $this->objAssetTransaction->SourceLocation->__toString() : null;
}
if ($this->lstDestinationLocation) {
$this->lstDestinationLocation->RemoveAllItems();
$this->lstDestinationLocation->AddItem(QApplication::Translate('- Select One -'), null);
$objDestinationLocationArray = Location::LoadAll();
if ($objDestinationLocationArray) {
foreach ($objDestinationLocationArray as $objDestinationLocation) {
$objListItem = new QListItem($objDestinationLocation->__toString(), $objDestinationLocation->LocationId);
if ($this->objAssetTransaction->DestinationLocation && $this->objAssetTransaction->DestinationLocation->LocationId == $objDestinationLocation->LocationId) {
$objListItem->Selected = true;
}
$this->lstDestinationLocation->AddItem($objListItem);
}
}
//.........这里部分代码省略.........
示例8: dtgLocation_Bind
protected function dtgLocation_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->dtgLocation->TotalItemCount = Location::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->dtgLocation->OrderByClause) {
array_push($objClauses, $objClause);
}
// Add the LimitClause information, as well
if ($objClause = $this->dtgLocation->LimitClause) {
array_push($objClauses, $objClause);
}
// Set the DataSource to be the array of all Location objects, given the clauses above
$this->dtgLocation->DataSource = Location::LoadAll($objClauses);
}
示例9: btnNext_Click
//.........这里部分代码省略.........
$this->btnUndoLastImport = new QButton($this);
$this->btnUndoLastImport->Text = "Undo Last Import";
$this->btnUndoLastImport->Display = false;
$this->btnUndoLastImport->AddAction(new QClickEvent(), new QServerAction('btnCancel_Click'));
$this->btnUndoLastImport->AddAction(new QEnterKeyEvent(), new QServerAction('btnCancel_Click'));
$this->btnUndoLastImport->AddAction(new QEnterKeyEvent(), new QTerminateAction());
// Import More button
$this->btnImportMore = new QButton($this);
$this->btnImportMore->Text = "Import More";
$this->btnImportMore->Display = false;
$this->btnImportMore->AddAction(new QClickEvent(), new QServerAction('btnImportMore_Click'));
$this->btnImportMore->AddAction(new QEnterKeyEvent(), new QServerAction('btnImportMore_Click'));
$this->btnImportMore->AddAction(new QEnterKeyEvent(), new QTerminateAction());
// Return to Assets button
$this->btnReturnTo = new QButton($this);
$this->btnReturnTo->Text = "Return to Locations";
$this->btnReturnTo->Display = false;
$this->btnReturnTo->AddAction(new QClickEvent(), new QServerAction('btnReturnTo_Click'));
$this->btnReturnTo->AddAction(new QEnterKeyEvent(), new QServerAction('btnReturnTo_Click'));
$this->btnReturnTo->AddAction(new QEnterKeyEvent(), new QTerminateAction());
} else {
$this->btnNext->Warning = "You must select all required fields.";
$blnError = true;
}
} else {
// Step 3 complete
set_time_limit(0);
$file_skipped = fopen($strFilePath = sprintf('%s/%s_location_skipped.csv', __DOCROOT__ . __SUBDIRECTORY__ . __TRACMOR_TMP__, $_SESSION['intUserAccountId']), "a");
if (!$this->blnImportEnd) {
if ($this->intImportStep == 2) {
$strLocationArray = array();
$this->objNewLocationArray = array();
// Load all manufacturers
foreach (Location::LoadAll() as $objLocation) {
$strLocationArray[] = stripslashes($objLocation->ShortDescription);
}
$txtDefaultValue = trim($this->txtMapDefaultValueArray[$this->intLocationKey]->Text);
// Add Default Value
if ($txtDefaultValue && !$this->in_array_nocase($txtDefaultValue, $strLocationArray)) {
$strLocationArray[] = $txtDefaultValue;
$objNewLocation = new Location();
$objNewLocation->ShortDescription = addslashes($txtDefaultValue);
$objNewLocation->EnabledFlag = 1;
$objNewLocation->AssetFlag = 1;
$objNewLocation->InventoryFlag = 1;
$objNewLocation->Save();
$this->objNewLocationArray[$objNewLocation->LocationId] = $objNewLocation->ShortDescription;
}
$this->btnNext->Warning = "Locations have been imported. Please wait...";
}
for ($j = $this->intCurrentFile; $j < count($this->strFilePathArray); $j++) {
$this->FileCsvData->load($this->strFilePathArray[$j]);
if (!$j) {
//$this->FileCsvData->appendRow($this->FileCsvData->getHeaders());
}
// Location Import
if ($this->intImportStep == 2) {
$arrItemCustomField = array();
/* Locations have no any custom fileds now
foreach ($this->arrTracmorField as $key => $value) {
if (substr($value, 0, 9) == 'location_') {
$intItemCustomFieldKeyArray[substr($value, 9)] = $key;
if (array_key_exists(substr($value, 9), $this->arrItemCustomField)) {
$arrItemCustomField[substr($value, 9)] = $this->arrItemCustomField[substr($value, 9)];
}
}
示例10: dtgLocation_Bind
public function dtgLocation_Bind()
{
// Get Total Count b/c of Pagination
$this->dtgLocation->TotalItemCount = Location::CountAll();
$objClauses = array();
if ($objClause = $this->dtgLocation->OrderByClause) {
array_push($objClauses, $objClause);
}
if ($objClause = $this->dtgLocation->LimitClause) {
array_push($objClauses, $objClause);
}
$this->dtgLocation->DataSource = Location::LoadAll($objClauses);
}