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


PHP Asset::Load方法代码示例

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


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

示例1: userpic

 public function userpic()
 {
     $userpic_id = $this->author_userpic_asset_id;
     if (empty($userpic_id) || !is_numeric($userpic_id)) {
         return;
     }
     require_once 'class.mt_asset.php';
     $asset = new Asset();
     $asset->Load("asset_id = {$userpic_id}");
     return $asset;
 }
开发者ID:benvanstaveren,项目名称:movabletype,代码行数:11,代码来源:class.mt_author.php

示例2: asset

 public function asset()
 {
     $col_name = "objectasset_asset_id";
     $asset = null;
     if (isset($this->{$col_name}) && is_numeric($this->{$col_name})) {
         $asset_id = $this->{$col_name};
         require_once 'class.mt_asset.php';
         $asset = new Asset();
         $asset->Load("asset_id = {$asset_id}");
     }
     return $asset;
 }
开发者ID:benvanstaveren,项目名称:movabletype,代码行数:12,代码来源:class.mt_objectasset.php

示例3: SetupAsset

 protected function SetupAsset()
 {
     // Lookup Object PK information from Query String (if applicable)
     // Set mode to Edit or New depending on what's found
     $intAssetId = QApplication::QueryString('intAssetId');
     if ($intAssetId) {
         $this->objAsset = Asset::Load($intAssetId);
         if (!$this->objAsset) {
             throw new Exception('Could not find a Asset object with PK arguments: ' . $intAssetId);
         }
         $this->strTitleVerb = QApplication::Translate('Edit');
         $this->blnEditMode = true;
     } else {
         $this->objAsset = new Asset();
         $this->strTitleVerb = QApplication::Translate('Create');
         $this->blnEditMode = false;
     }
 }
开发者ID:brustj,项目名称:tracmor,代码行数:18,代码来源:AssetEditFormBase.class.php

示例4: SetupAsset

 public function SetupAsset($objCaller = null)
 {
     // Lookup Object PK information from Query String (if applicable)
     // Set mode to Edit or New depending on what's found
     // Overridden from AssetEditFormBase to add the $objCaller parameter
     $intAssetId = QApplication::QueryString('intAssetId');
     if ($intAssetId) {
         $objCaller->objAsset = Asset::Load($intAssetId);
         if (!$objCaller->objAsset) {
             throw new Exception('Could not find a Asset object with PK arguments: ' . $intAssetId);
         }
         $objCaller->strTitleVerb = QApplication::Translate('Edit');
         $objCaller->blnEditMode = true;
     } else {
         $objCaller->objAsset = new Asset();
         $objCaller->strTitleVerb = QApplication::Translate('Create');
         $objCaller->blnEditMode = false;
     }
     QApplication::AuthorizeEntity($objCaller->objAsset, $objCaller->blnEditMode);
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:20,代码来源:asset_edit.php

示例5: btnSave_Click

 public function btnSave_Click($strFormId, $strControlId, $strParameter)
 {
     $this->btnCancel->Warning = "";
     if ($this->objAssetArray) {
         $blnError = false;
         foreach ($this->objAssetArray as $asset) {
             // TransactionTypeId = 1 is for moves
             if ($this->intTransactionTypeId == 1) {
                 if ($asset->LocationId == $this->lstLocation->SelectedValue) {
                     $this->dtgAssetTransact->Warning = 'Cannot move an asset from a location to the same location.';
                     $blnError = true;
                 }
             }
             // For all transactions except Unreserve, make sure the asset is not already reserved
             if ($this->intTransactionTypeId != 9 && $asset->ReservedFlag) {
                 $this->btnCancel->Warning = sprintf('The Asset %s is reserved.', $asset->AssetCode);
                 $blnError = true;
             }
             // For all transactions except Unarchive, make sure the asset is not already archived
             if ($this->intTransactionTypeId != 11 && $asset->ArchivedFlag) {
                 $this->btnCancel->Warning = sprintf('The Asset %s is archived.', $asset->AssetCode);
                 $blnError = true;
             }
         }
         if (!$blnError) {
             if ($this->intTransactionTypeId == 3) {
                 $this->lstCheckOutTo->Warning = '';
                 $this->lstDueDate->Warning = '';
                 $intToUser = "";
                 $intToContact = "";
                 $dttDueDate = "";
                 if ((QApplication::$TracmorSettings->CheckOutToOtherUsers == "1" || QApplication::$TracmorSettings->CheckOutToContacts == "1") && $this->lstCheckOutTo->Display) {
                     if ($this->lstCheckOutTo->SelectedValue == "1") {
                         if (!$this->lstUser->SelectedValue) {
                             $this->lstCheckOutTo->Warning = 'Please select a user.';
                             $blnError = true;
                         } else {
                             $intToUser = $this->lstUser->SelectedValue;
                         }
                     } elseif ($this->lstCheckOutTo->SelectedValue == "2") {
                         if (!$this->lstToContact->SelectedValue) {
                             $this->lstCheckOutTo->Warning = 'Please select a contact.';
                             $blnError = true;
                         } else {
                             $intToContact = $this->lstToContact->SelectedValue;
                         }
                     } else {
                         $this->lstCheckOutTo->Warning = 'Please select one of the options';
                         $blnError = true;
                     }
                 } else {
                     $intToUser = QApplication::$objUserAccount->UserAccountId;
                 }
                 if ($this->lstDueDate->Display) {
                     if ($this->lstDueDate->SelectedValue == 2) {
                         $dttDueDate = $this->dttDueDate;
                         if ($dttDueDate && $dttDueDate->DateTime < QDateTime::Now()) {
                             $this->lstDueDate->Warning = 'Due date must be a future date';
                             $blnError = true;
                         }
                     } elseif (QApplication::$TracmorSettings->DueDateRequired == "1") {
                         $this->lstDueDate->Warning = 'Due date is required';
                         $blnError = true;
                     }
                 }
             }
             if (QApplication::$TracmorSettings->ReasonRequired == "1" && !trim($this->txtNote->Text) && $this->intTransactionTypeId == 3) {
                 $this->txtNote->Warning = 'Reason is required.';
                 $blnError = true;
             } elseif (($this->intTransactionTypeId == 1 || $this->intTransactionTypeId == 2 || $this->intTransactionTypeId == 11) && is_null($this->lstLocation->SelectedValue)) {
                 $this->lstLocation->Warning = 'Location is required.';
                 $blnError = true;
             } elseif ($this->txtNote->Text == '' && $this->intTransactionTypeId != 3) {
                 $this->txtNote->Warning = 'Note is required.';
                 $blnError = true;
             }
         }
         if (!$blnError) {
             try {
                 // Get an instance of the database
                 $objDatabase = QApplication::$Database[1];
                 // Begin a MySQL Transaction to be either committed or rolled back
                 $objDatabase->TransactionBegin();
                 // Create the new transaction object and save it
                 $this->objTransaction = new Transaction();
                 // Entity Qtype is Asset
                 $this->objTransaction->EntityQtypeId = EntityQtype::Asset;
                 $this->objTransaction->TransactionTypeId = $this->intTransactionTypeId;
                 $this->objTransaction->Note = $this->txtNote->Text;
                 $this->objTransaction->Save();
                 // Assign different source and destinations depending on transaction type
                 foreach ($this->objAssetArray as $asset) {
                     if ($asset instanceof Asset && $asset->LinkedFlag != 1) {
                         $SourceLocationId = $asset->LocationId;
                         // Load all linked assets
                         $objLinkedAssetArrayByNewAsset = Asset::LoadChildLinkedArrayByParentAssetId($asset->AssetId);
                         if (!$objLinkedAssetArrayByNewAsset) {
                             $objLinkedAssetArrayByNewAsset = array();
                         }
                         if ($this->intTransactionTypeId == 1) {
//.........这里部分代码省略.........
开发者ID:jdellinger,项目名称:tracmor,代码行数:101,代码来源:QAssetTransactComposite.class.php

示例6: UpdateShipmentFields

 protected function UpdateShipmentFields()
 {
     if (!$this->blnEditMode) {
         //$this->objShipment->TransactionId = $this->objTransaction->TransactionId;
         $this->objShipment->Transaction = $this->objTransaction;
     }
     if ($this->blnEditMode) {
         if (!$this->objTransaction) {
             $this->objTransaction = Transaction::Load($this->objShipment->TransactionId);
         }
         $this->objShipment->Transaction = $this->objTransaction;
         $this->objShipment->ShipmentNumber = $this->lblShipmentNumber->Text;
     } elseif (QApplication::$TracmorSettings->CustomShipmentNumbers) {
         $this->objShipment->ShipmentNumber = $this->txtShipmentNumber->Text;
     } else {
         $this->objShipment->ShipmentNumber = Shipment::LoadNewShipmentNumber();
     }
     $this->objShipment->ToContactId = $this->lstToContact->SelectedValue;
     $this->objShipment->FromCompanyId = $this->lstFromCompany->SelectedValue;
     $this->objShipment->FromContactId = $this->lstFromContact->SelectedValue;
     $this->objShipment->ShipDate = $this->calShipDate->DateTime;
     $this->objShipment->FromAddressId = $this->lstFromAddress->SelectedValue;
     $this->objShipment->ToCompanyId = $this->lstToCompany->SelectedValue;
     $this->objShipment->ToAddressId = $this->lstToAddress->SelectedValue;
     $this->objShipment->CourierId = $this->lstCourier->SelectedValue;
     //if (!$this->lstCourier->SelectedValue) {
     $this->objShipment->TrackingNumber = $this->txtTrackingNumber->Text;
     //}
     // Reload the Assets and inventory locations so that they don't trigger an OLE if completing the shipment without reloading after adding an asset or inventory.
     if ($this->objAssetTransactionArray) {
         foreach ($this->objAssetTransactionArray as $objAssetTransaction) {
             $objAssetTransaction->Asset = Asset::Load($objAssetTransaction->AssetId);
         }
     }
     if ($this->objInventoryTransactionArray) {
         foreach ($this->objInventoryTransactionArray as $objInventoryTransaction) {
             $objInventoryTransaction->InventoryLocation = InventoryLocation::Load($objInventoryTransaction->InventoryLocationId);
         }
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:40,代码来源:shipment_edit.php

示例7: __get

 /**
  * Override method to perform a property "Get"
  * This will get the value of $strName
  *
  * @param string $strName Name of the property to get
  * @return mixed
  */
 public function __get($strName)
 {
     switch ($strName) {
         ///////////////////
         // Member Variables
         ///////////////////
         case 'AssetTransactionId':
             // Gets the value for intAssetTransactionId (Read-Only PK)
             // @return integer
             return $this->intAssetTransactionId;
         case 'AssetId':
             // Gets the value for intAssetId (Not Null)
             // @return integer
             return $this->intAssetId;
         case 'TransactionId':
             // Gets the value for intTransactionId (Not Null)
             // @return integer
             return $this->intTransactionId;
         case 'ParentAssetTransactionId':
             // Gets the value for intParentAssetTransactionId
             // @return integer
             return $this->intParentAssetTransactionId;
         case 'SourceLocationId':
             // Gets the value for intSourceLocationId
             // @return integer
             return $this->intSourceLocationId;
         case 'DestinationLocationId':
             // Gets the value for intDestinationLocationId
             // @return integer
             return $this->intDestinationLocationId;
         case 'NewAssetFlag':
             // Gets the value for blnNewAssetFlag
             // @return boolean
             return $this->blnNewAssetFlag;
         case 'NewAssetId':
             // Gets the value for intNewAssetId
             // @return integer
             return $this->intNewAssetId;
         case 'ScheduleReceiptFlag':
             // Gets the value for blnScheduleReceiptFlag
             // @return boolean
             return $this->blnScheduleReceiptFlag;
         case 'ScheduleReceiptDueDate':
             // Gets the value for dttScheduleReceiptDueDate
             // @return QDateTime
             return $this->dttScheduleReceiptDueDate;
         case 'CreatedBy':
             // Gets the value for intCreatedBy
             // @return integer
             return $this->intCreatedBy;
         case 'CreationDate':
             // Gets the value for dttCreationDate
             // @return QDateTime
             return $this->dttCreationDate;
         case 'ModifiedBy':
             // Gets the value for intModifiedBy
             // @return integer
             return $this->intModifiedBy;
         case 'ModifiedDate':
             // Gets the value for strModifiedDate (Read-Only Timestamp)
             // @return string
             return $this->strModifiedDate;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'Asset':
             // Gets the value for the Asset object referenced by intAssetId (Not Null)
             // @return Asset
             try {
                 if (!$this->objAsset && !is_null($this->intAssetId)) {
                     $this->objAsset = Asset::Load($this->intAssetId);
                 }
                 return $this->objAsset;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Transaction':
             // Gets the value for the Transaction object referenced by intTransactionId (Not Null)
             // @return Transaction
             try {
                 if (!$this->objTransaction && !is_null($this->intTransactionId)) {
                     $this->objTransaction = Transaction::Load($this->intTransactionId);
                 }
                 return $this->objTransaction;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ParentAssetTransaction':
//.........这里部分代码省略.........
开发者ID:proxymoron,项目名称:tracmor,代码行数:101,代码来源:AssetTransactionGen.class.php

示例8: btnNext_Click


//.........这里部分代码省略.........
                             $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
         $blnRequiredAllAssetCustomFields = true;
         $blnError = false;
         $blnAssetCode = false;
         $blnAssetModelShortDescription = false;
         $blnLocation = false;
         $blnAssetId = false;
         // $array Required Custom Fields for All Asset Models
         $arrAssetCustomFieldOptions = EntityQtypeCustomField::LoadArrayByEntityQtypeId(QApplication::Translate(EntityQtype::Asset));
         // generate error flag and field names which are required for export;
         $arrRequiredAllAssetCustomFields = array();
         foreach ($arrAssetCustomFieldOptions as $arrAssetCustomFieldOption) {
             if ($arrAssetCustomFieldOption->CustomField->RequiredFlag && $arrAssetCustomFieldOption->CustomField->ActiveFlag && $arrAssetCustomFieldOption->CustomField->AllAssetModelsFlag) {
                 $arrRequiredAllAssetCustomFields[] = $arrAssetCustomFieldOption->CustomField->ShortDescription;
                 if (!in_array($arrAssetCustomFieldOption->CustomField->ShortDescription, $this->getLstKeys())) {
                     $blnRequiredAllAssetCustomFields = false;
                 }
             }
         }
         // Checking errors (Model Short Description, Model Code, Category and Manufacturer must be selected)
         for ($i = 0; $i < count($this->lstMapHeaderArray) - 1; $i++) {
             $lstMapHeader = $this->lstMapHeaderArray[$i];
             $strSelectedValue = strtolower($lstMapHeader->SelectedValue);
             if ($strSelectedValue == "model") {
                 $blnAssetModelShortDescription = true;
             } elseif ($strSelectedValue == "asset tag") {
                 $blnAssetCode = true;
             } elseif ($strSelectedValue == "location") {
                 $blnLocation = true;
             } elseif ($strSelectedValue == "id") {
                 $blnAssetId = 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 {
开发者ID:proxymoron,项目名称:tracmor,代码行数:67,代码来源:asset_import.php

示例9: array_unique

 }
 if (!$blnError) {
     $arrPendingReceiptId = array_unique($arrPendingReceiptId);
     foreach ($objAssetArray as $objAsset) {
         $objDestinationLocation = $arrLocation[$objAsset->AssetId];
         $intDestinationLocationId = $objDestinationLocation->LocationId;
         // Set the DestinationLocation of the AssetTransaction
         $objAssetTransaction = $objAssetTransactionArray[$objAsset->AssetId];
         $objAssetTransaction->DestinationLocationId = $intDestinationLocationId;
         $objAssetTransaction->Save();
         // Reload AssetTransaction to avoid Optimistic Locking Exception if this receipt is edited and saved.
         $objAssetTransaction = AssetTransaction::Load($objAssetTransaction->AssetTransactionId);
         // Move the asset to the new location
         $objAssetTransaction->Asset->LocationId = $intDestinationLocationId;
         $objAssetTransaction->Asset->Save();
         $objAssetTransaction->Asset = Asset::Load($objAssetTransaction->AssetId);
     }
     foreach ($arrPendingReceiptId as $intReceiptId) {
         Receipt::ReceiptComplete($intReceiptId);
     }
     $strWarning .= "Your transaction has successfully completed<br /><a href='index.php'>Main Menu</a> | <a href='asset_menu.php'>Manage Assets</a><br />";
     //Remove that flag when transaction is compelete or exists some errors
     unset($_SESSION['intUserAccountId']);
     $blnTransactionComplete = true;
     $arrCheckedAssetCodeLocation = "";
 } else {
     $strWarning .= "This transaction has not been completed.<br />";
 }
 if (is_array($arrCheckedAssetCodeLocation)) {
     foreach ($arrCheckedAssetCodeLocation as $strAssetCodeLocation) {
         list($strAssetCode, $strLocation) = split('[|]', $strAssetCodeLocation, 2);
开发者ID:heshuai64,项目名称:einv2,代码行数:31,代码来源:asset_receive.php

示例10: btnApply_Click

 public function btnApply_Click($strFormId, $strControlId, $strParameter)
 {
     $this->EnableSelectedControls();
     $this->ClearWarnings();
     $blnError = false;
     // Make sure at least one checkbox is checked
     if (!$this->chkModel->Checked && !$this->chkParentAssetCode->Checked && !$this->chkChkLockToParent->Checked) {
         $blnChecked = false;
         foreach ($this->arrCheckboxes as $objCheckBox) {
             if ($objCheckBox->Checked) {
                 $blnChecked = true;
                 break;
             }
         }
         if (!$blnChecked) {
             $blnError = true;
             $this->btnCancel->Warning = 'You must select at least one field to edit.';
             return;
         }
     }
     // If Model is checked, make sure a model is selected
     if ($this->chkModel->Checked && $this->lstModel->SelectedValue == null) {
         $blnError = true;
         $this->lstModel->Warning = 'You must select a Model.';
         return;
     }
     // Get an instance of the database
     $objDatabase = QApplication::$Database[1];
     // Begin a MySQL Transaction to be either committed or rolled back
     $objDatabase->TransactionBegin();
     $set = array(sprintf('`modified_by`= %s', QApplication::$objUserAccount->UserAccountId));
     if (count($this->arrCustomFields) > 0) {
         $customFieldIdArray = array();
         foreach ($this->arrCustomFields as $field) {
             if ($this->arrCheckboxes[$field['input']->strControlId]->Checked) {
                 if ($field['input'] instanceof QTextBox && $field['input']->Required && $field['input']->Text == null || $field['input'] instanceof QListBox && $field['input']->Required && $field['input']->SelectedValue == null) {
                     $blnError = true;
                     $field['input']->Warning = "Required.";
                 } else {
                     $this->arrCustomFieldsToEdit[] = $field;
                     $customFieldIdArray[] = (int) str_replace('cf', '', $field['input']->strControlId);
                 }
             }
         }
     }
     foreach ($this->arrAssetToEdit as $intAssetToEditId) {
         $objAsset = Asset::Load($intAssetToEditId);
         // First check that the user is authorized to edit this asset
         if (!QApplication::AuthorizeEntityBoolean($objAsset, 2)) {
             $blnError = true;
             $this->btnCancel->Warning = 'You are not authorized to edit one or more of the selected assets.';
             break;
         }
         if ($this->chkParentAssetCode->Checked && $this->txtParentAssetCode->Text) {
             // Check if the parent asset tag is already a child asset of this asset
             $arrChildAsset = Asset::LoadArrayByParentAssetId($intAssetToEditId);
             foreach ($arrChildAsset as $objChildAsset) {
                 if ($objChildAsset->AssetCode == $this->txtParentAssetCode->Text) {
                     $blnError = true;
                     $this->txtParentAssetCode->Warning = "Parent asset tag is already a child of this asset.";
                     break 2;
                 }
             }
             if ($this->txtParentAssetCode->Text != $objAsset->AssetCode) {
                 $objParentAsset = Asset::LoadByAssetCode($this->txtParentAssetCode->Text);
                 if (!$objParentAsset) {
                     $blnError = true;
                     $this->txtParentAssetCode->Warning = "That asset tag does not exist.";
                     break;
                 } else {
                     if ($this->chkLockToParent->Checked && !($objAsset->ParentAssetId == $objParentAsset->AssetId && $objAsset->LinkedFlag == 1) && $objParentAsset->LocationId != $objAsset->LocationId) {
                         // If locking child to parent, make sure assets are at the same location
                         $blnError = true;
                         $this->chkLockToParent->Warning = 'Cannot lock to parent asset at another location.';
                         break;
                     } else {
                         if ($this->chkLockToParent->Checked && !($objAsset->ParentAssetId == $objParentAsset->AssetId && $objAsset->LinkedFlag == 1) && ($objParentAsset->CheckedOutFlag || $objParentAsset->ReservedFlag || $objParentAsset->ArchivedFlag || $objParentAsset->LocationId == 2 || $objParentAsset->LocationId == 5 || AssetTransaction::PendingTransaction($objParentAsset->AssetId))) {
                             $blnError = true;
                             $this->chkLockToParent->Warning = "Parent asset tag (" . $objParentAsset->AssetCode . ") must not be currently Archived, Checked Out, Pending Shipment, Shipped/TBR, or Reserved.";
                             break;
                         } else {
                             if ($this->chkLockToParent->Checked && !($objAsset->ParentAssetId == $objParentAsset->AssetId && $objAsset->LinkedFlag == 1) && ($objAsset->CheckedOutFlag || $objAsset->ReservedFlag || $objAsset->ArchivedFlag || $objAsset->LocationId == 2 || $objAsset->LocationId == 5 || AssetTransaction::PendingTransaction($objAsset->AssetId))) {
                                 $blnError = true;
                                 $this->chkLockToParent->Warning .= "Child asset must not be currently Archived, Checked Out, Pending Shipment, Shipped/TBR, or Reserved.";
                                 break;
                             } else {
                                 $objAsset->ParentAssetId = $objParentAsset->AssetId;
                                 if ($this->chkLockToParent->Checked) {
                                     $objAsset->LinkedFlag = 1;
                                 } else {
                                     $objAsset->LinkedFlag = 0;
                                 }
                             }
                         }
                     }
                 }
             } else {
                 $blnError = true;
                 $this->txtParentAssetCode->Warning = "Asset cannot be assigned as its own parent.";
                 break;
//.........这里部分代码省略.........
开发者ID:proxymoron,项目名称:tracmor,代码行数:101,代码来源:AssetMassEditPanel.class.php

示例11: btnEdit_Click

 public function btnEdit_Click($strFormId, $strControlId, $strParameter)
 {
     $strParameterArray = explode(',', $strParameter);
     $objAsset = Asset::Load($strParameterArray[0]);
     $objEditPanel = new AssetEditPanel($this, $this->strCloseEditPanelMethod, $objAsset);
     $strMethodName = $this->strSetEditPanelMethod;
     $this->objForm->{$strMethodName}($objEditPanel);
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:8,代码来源:AssetListPanelBase.class.php

示例12: __get


//.........这里部分代码省略.........
              */
             return $this->intCreatedBy;
         case 'CreationDate':
             /**
              * Gets the value for dttCreationDate 
              * @return QDateTime
              */
             return $this->dttCreationDate;
         case 'ModifiedBy':
             /**
              * Gets the value for intModifiedBy 
              * @return integer
              */
             return $this->intModifiedBy;
         case 'ModifiedDate':
             /**
              * Gets the value for strModifiedDate (Read-Only Timestamp)
              * @return string
              */
             return $this->strModifiedDate;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'Asset':
             /**
              * Gets the value for the Asset object referenced by intAssetId (Not Null)
              * @return Asset
              */
             try {
                 if (!$this->objAsset && !is_null($this->intAssetId)) {
                     $this->objAsset = Asset::Load($this->intAssetId);
                 }
                 return $this->objAsset;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Transaction':
             /**
              * Gets the value for the Transaction object referenced by intTransactionId (Not Null)
              * @return Transaction
              */
             try {
                 if (!$this->objTransaction && !is_null($this->intTransactionId)) {
                     $this->objTransaction = Transaction::Load($this->intTransactionId);
                 }
                 return $this->objTransaction;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ParentAssetTransaction':
             /**
              * Gets the value for the AssetTransaction object referenced by intParentAssetTransactionId 
              * @return AssetTransaction
              */
             try {
                 if (!$this->objParentAssetTransaction && !is_null($this->intParentAssetTransactionId)) {
                     $this->objParentAssetTransaction = AssetTransaction::Load($this->intParentAssetTransactionId);
                 }
                 return $this->objParentAssetTransaction;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
开发者ID:heshuai64,项目名称:einv2,代码行数:67,代码来源:AssetTransactionGen.class.php

示例13: SetupDisplay

 public function SetupDisplay($intTransactionTypeId)
 {
     $this->intTransactionTypeId = $intTransactionTypeId;
     $this->ctlAssetSearchTool->blnSearchArchived = false;
     switch ($this->intTransactionTypeId) {
         // Move
         case 1:
             $this->lstLocation->Display = true;
             break;
             // Check In
         // Check In
         case 2:
             $this->lstLocation->Display = true;
             break;
             // Check Out
         // Check Out
         case 3:
             $this->lstLocation->Display = false;
             break;
             // Reserve
         // Reserve
         case 8:
             $this->lstLocation->Display = false;
             break;
             // Unreserve
         // Unreserve
         case 9:
             $this->lstLocation->Display = false;
             break;
             // Archive
         // Archive
         case 10:
             $this->lstLocation->Display = false;
             break;
             // Unarchive
         // Unarchive
         case 11:
             $this->lstLocation->Display = true;
             $this->ctlAssetSearchTool->blnSearchArchived = true;
             break;
     }
     // Redeclare in case the asset has been edited
     $this->objAssetArray = null;
     if ($this->blnEditMode && $this->objAsset instanceof Asset) {
         $this->objAssetArray[] = Asset::Load($this->objAsset->AssetId);
         // Load all child assets
         $objLinkedAssetArray = Asset::LoadChildLinkedArrayByParentAssetId($this->objAsset->AssetId);
         if ($objLinkedAssetArray) {
             $strAssetCodeArray = array();
             foreach ($objLinkedAssetArray as $objLinkedAsset) {
                 $strAssetCodeArray[] = $objLinkedAsset->AssetCode;
                 $this->objAssetArray[] = $objLinkedAsset;
             }
             $this->txtNewAssetCode->Warning = sprintf("The following asset(s) have been added to the transaction because they are locked to asset (%s):<br />%s", $this->objAsset->AssetCode, implode('<br />', $strAssetCodeArray));
         }
     }
 }
开发者ID:brustj,项目名称:tracmor,代码行数:57,代码来源:QAssetTransactComposite.class.php

示例14: SetupDisplay

 public function SetupDisplay($intTransactionTypeId)
 {
     $this->intTransactionTypeId = $intTransactionTypeId;
     switch ($this->intTransactionTypeId) {
         // Move
         case 1:
             $this->lstLocation->Display = true;
             break;
             // Check In
         // Check In
         case 2:
             $this->lstLocation->Display = true;
             break;
             // Check Out
         // Check Out
         case 3:
             $this->lstLocation->Display = false;
             break;
             // Reserve
         // Reserve
         case 8:
             $this->lstLocation->Display = false;
             break;
             // Unreserve
         // Unreserve
         case 9:
             $this->lstLocation->Display = false;
             break;
     }
     // Redeclare in case the asset has been edited
     $this->objAssetArray = null;
     if ($this->blnEditMode && $this->objAsset instanceof Asset) {
         $this->objAssetArray[] = Asset::Load($this->objAsset->AssetId);
     }
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:35,代码来源:QAssetTransactComposite.class.php

示例15: __get

 /**
  * Override method to perform a property "Get"
  * This will get the value of $strName
  *
  * @param string $strName Name of the property to get
  * @return mixed
  */
 public function __get($strName)
 {
     switch ($strName) {
         ///////////////////
         // Member Variables
         ///////////////////
         case 'AssetId':
             // Gets the value for intAssetId (PK)
             // @return integer
             return $this->intAssetId;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'Asset':
             // Gets the value for the Asset object referenced by intAssetId (PK)
             // @return Asset
             try {
                 if (!$this->objAsset && !is_null($this->intAssetId)) {
                     $this->objAsset = Asset::Load($this->intAssetId);
                 }
                 return $this->objAsset;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             ////////////////////////////
             // Virtual Object References (Many to Many and Reverse References)
             // (If restored via a "Many-to" expansion)
             ////////////////////////////
         ////////////////////////////
         // Virtual Object References (Many to Many and Reverse References)
         // (If restored via a "Many-to" expansion)
         ////////////////////////////
         case '__Restored':
             return $this->__blnRestored;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:54,代码来源:AssetCustomFieldHelperGen.class.php


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