當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Audit::Load方法代碼示例

本文整理匯總了PHP中Audit::Load方法的典型用法代碼示例。如果您正苦於以下問題:PHP Audit::Load方法的具體用法?PHP Audit::Load怎麽用?PHP Audit::Load使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Audit的用法示例。


在下文中一共展示了Audit::Load方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Form_Create

 protected function Form_Create()
 {
     // Create the Header Menu
     $this->ctlHeaderMenu_Create();
     $this->ctlShortcutMenu_Create();
     if ($_GET && $_GET['method'] == 'delete') {
         $objAudit = Audit::Load($_GET['intAuditId']);
         if ($objAudit) {
             $objAudit->Delete();
             QApplication::Redirect("./inventory_audit_list.php");
         }
     }
     // Load an array of Audit objects using join on UserAccount.
     $this->objAuditArray = Audit::LoadArrayByEntityQtypeId(2, QQ::Clause(QQ::Expand(QQN::Audit()->CreatedByObject)));
 }
開發者ID:proxymoron,項目名稱:tracmor,代碼行數:15,代碼來源:inventory_audit_list.php

示例2: Form_Create

 protected function Form_Create()
 {
     // Create the Header Menu
     $this->ctlHeaderMenu_Create();
     $this->ctlShortcutMenu_Create();
     //QApplication::$Database[1]->EnableProfiling();
     if ($_GET && $_GET['method'] == 'delete') {
         $objAudit = Audit::Load($_GET['intAuditId']);
         if ($objAudit) {
             // Set the relationship to ON DELETE CASCADE so that the AuditScans will be automatically deleted when deleting the Audit Object
             $objAudit->Delete();
             QApplication::Redirect("./asset_audit_list.php");
         }
     }
     // Load an array of Audit objects using join on UserAccount.
     $this->objAuditArray = Audit::LoadAll(QQ::Clause(QQ::Expand(QQN::Audit()->CreatedByObject)));
 }
開發者ID:heshuai64,項目名稱:einv2,代碼行數:17,代碼來源:asset_audit_list.php

示例3: SetupAudit

 protected function SetupAudit()
 {
     // Lookup Object PK information from Query String (if applicable)
     // Set mode to Edit or New depending on what's found
     $intAuditId = QApplication::QueryString('intAuditId');
     if ($intAuditId) {
         $this->objAudit = Audit::Load($intAuditId);
         if (!$this->objAudit) {
             throw new Exception('Could not find a Audit object with PK arguments: ' . $intAuditId);
         }
         $this->strTitleVerb = QApplication::Translate('Edit');
         $this->blnEditMode = true;
     } else {
         $this->objAudit = new Audit();
         $this->strTitleVerb = QApplication::Translate('Create');
         $this->blnEditMode = false;
     }
 }
開發者ID:heshuai64,項目名稱:einv2,代碼行數:18,代碼來源:AuditEditFormBase.class.php

示例4: btnEdit_Click

 public function btnEdit_Click($strFormId, $strControlId, $strParameter)
 {
     $strParameterArray = explode(',', $strParameter);
     $objAudit = Audit::Load($strParameterArray[0]);
     $objEditPanel = new AuditEditPanel($this, $this->strCloseEditPanelMethod, $objAudit);
     $strMethodName = $this->strSetEditPanelMethod;
     $this->objForm->{$strMethodName}($objEditPanel);
 }
開發者ID:heshuai64,項目名稱:einv2,代碼行數:8,代碼來源:AuditListPanelBase.class.php

示例5: Create

 /**
  * Static Helper Method to Create using PK arguments
  * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
  * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
  * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
  * edit, or if we are also allowed to create a new one, etc.
  * 
  * @param mixed $objParentObject QForm or QPanel which will be using this AuditMetaControl
  * @param integer $intAuditId primary key value
  * @param QMetaControlCreateType $intCreateType rules governing Audit object creation - defaults to CreateOrEdit
  * @return AuditMetaControl
  */
 public static function Create($objParentObject, $intAuditId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit)
 {
     // Attempt to Load from PK Arguments
     if (strlen($intAuditId)) {
         $objAudit = Audit::Load($intAuditId);
         // Audit was found -- return it!
         if ($objAudit) {
             return new AuditMetaControl($objParentObject, $objAudit);
         } else {
             if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) {
                 throw new QCallerException('Could not find a Audit object with PK arguments: ' . $intAuditId);
             }
         }
         // If EditOnly is specified, throw an exception
     } else {
         if ($intCreateType == QMetaControlCreateType::EditOnly) {
             throw new QCallerException('No PK arguments specified');
         }
     }
     // If we are here, then we need to create a new record
     return new AuditMetaControl($objParentObject, new Audit());
 }
開發者ID:proxymoron,項目名稱:tracmor,代碼行數:34,代碼來源:AuditMetaControlGen.class.php

示例6: __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 'AuditScanId':
             // Gets the value for intAuditScanId (Read-Only PK)
             // @return integer
             return $this->intAuditScanId;
         case 'AuditId':
             // Gets the value for intAuditId (Not Null)
             // @return integer
             return $this->intAuditId;
         case 'LocationId':
             // Gets the value for intLocationId (Not Null)
             // @return integer
             return $this->intLocationId;
         case 'EntityId':
             // Gets the value for intEntityId
             // @return integer
             return $this->intEntityId;
         case 'Count':
             // Gets the value for intCount
             // @return integer
             return $this->intCount;
         case 'SystemCount':
             // Gets the value for intSystemCount
             // @return integer
             return $this->intSystemCount;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'Audit':
             // Gets the value for the Audit object referenced by intAuditId (Not Null)
             // @return Audit
             try {
                 if (!$this->objAudit && !is_null($this->intAuditId)) {
                     $this->objAudit = Audit::Load($this->intAuditId);
                 }
                 return $this->objAudit;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Location':
             // Gets the value for the Location object referenced by intLocationId (Not Null)
             // @return Location
             try {
                 if (!$this->objLocation && !is_null($this->intLocationId)) {
                     $this->objLocation = Location::Load($this->intLocationId);
                 }
                 return $this->objLocation;
             } 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,代碼行數:86,代碼來源:AuditScanGen.class.php

示例7: Reload

 /**
  * Reload this Audit from the database.
  * @return void
  */
 public function Reload()
 {
     // Make sure we are actually Restored from the database
     if (!$this->__blnRestored) {
         throw new QCallerException('Cannot call Reload() on a new, unsaved Audit object.');
     }
     // Reload the Object
     $objReloaded = Audit::Load($this->intAuditId);
     // Update $this's local variables to match
     $this->EntityQtypeId = $objReloaded->EntityQtypeId;
     $this->CreatedBy = $objReloaded->CreatedBy;
     $this->dttCreationDate = $objReloaded->dttCreationDate;
     $this->ModifiedBy = $objReloaded->ModifiedBy;
     $this->strModifiedDate = $objReloaded->strModifiedDate;
 }
開發者ID:proxymoron,項目名稱:tracmor,代碼行數:19,代碼來源:AuditGen.class.php


注:本文中的Audit::Load方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。