本文整理汇总了PHP中Manufacturer::Load方法的典型用法代码示例。如果您正苦于以下问题:PHP Manufacturer::Load方法的具体用法?PHP Manufacturer::Load怎么用?PHP Manufacturer::Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Manufacturer
的用法示例。
在下文中一共展示了Manufacturer::Load方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SetupManufacturer
protected function SetupManufacturer()
{
// Lookup Object PK information from Query String (if applicable)
// Set mode to Edit or New depending on what's found
$intManufacturerId = QApplication::QueryString('intManufacturerId');
if ($intManufacturerId) {
$this->objManufacturer = Manufacturer::Load($intManufacturerId);
if (!$this->objManufacturer) {
throw new Exception('Could not find a Manufacturer object with PK arguments: ' . $intManufacturerId);
}
$this->strTitleVerb = QApplication::Translate('Edit');
$this->blnEditMode = true;
} else {
$this->objManufacturer = new Manufacturer();
$this->strTitleVerb = QApplication::Translate('Create');
$this->blnEditMode = false;
}
}
示例2: __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 'InventoryModelId':
/**
* Gets the value for intInventoryModelId (Read-Only PK)
* @return integer
*/
return $this->intInventoryModelId;
case 'CategoryId':
/**
* Gets the value for intCategoryId
* @return integer
*/
return $this->intCategoryId;
case 'ManufacturerId':
/**
* Gets the value for intManufacturerId
* @return integer
*/
return $this->intManufacturerId;
case 'InventoryModelCode':
/**
* Gets the value for strInventoryModelCode (Unique)
* @return string
*/
return $this->strInventoryModelCode;
case 'ShortDescription':
/**
* Gets the value for strShortDescription (Not Null)
* @return string
*/
return $this->strShortDescription;
case 'LongDescription':
/**
* Gets the value for strLongDescription
* @return string
*/
return $this->strLongDescription;
case 'ImagePath':
/**
* Gets the value for strImagePath
* @return string
*/
return $this->strImagePath;
case 'Price':
/**
* Gets the value for fltPrice
* @return double
*/
return $this->fltPrice;
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 'Category':
/**
* Gets the value for the Category object referenced by intCategoryId
* @return Category
*/
try {
if (!$this->objCategory && !is_null($this->intCategoryId)) {
$this->objCategory = Category::Load($this->intCategoryId);
}
//.........这里部分代码省略.........
示例3: Reload
/**
* Reload this Manufacturer 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 Manufacturer object.');
}
// Reload the Object
$objReloaded = Manufacturer::Load($this->intManufacturerId);
// Update $this's local variables to match
$this->strShortDescription = $objReloaded->strShortDescription;
$this->strLongDescription = $objReloaded->strLongDescription;
$this->strImagePath = $objReloaded->strImagePath;
$this->CreatedBy = $objReloaded->CreatedBy;
$this->dttCreationDate = $objReloaded->dttCreationDate;
$this->ModifiedBy = $objReloaded->ModifiedBy;
$this->strModifiedDate = $objReloaded->strModifiedDate;
}
示例4: btnEdit_Click
public function btnEdit_Click($strFormId, $strControlId, $strParameter)
{
$strParameterArray = explode(',', $strParameter);
$objManufacturer = Manufacturer::Load($strParameterArray[0]);
$objEditPanel = new ManufacturerEditPanel($this, $this->strCloseEditPanelMethod, $objManufacturer);
$strMethodName = $this->strSetEditPanelMethod;
$this->objForm->{$strMethodName}($objEditPanel);
}
示例5: __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 'ManufacturerId':
// Gets the value for intManufacturerId (PK)
// @return integer
return $this->intManufacturerId;
///////////////////
// Member Objects
///////////////////
///////////////////
// Member Objects
///////////////////
case 'Manufacturer':
// Gets the value for the Manufacturer object referenced by intManufacturerId (PK)
// @return Manufacturer
try {
if (!$this->objManufacturer && !is_null($this->intManufacturerId)) {
$this->objManufacturer = Manufacturer::Load($this->intManufacturerId);
}
return $this->objManufacturer;
} 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;
}
}
}
示例6: 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 ManufacturerMetaControl
* @param integer $intManufacturerId primary key value
* @param QMetaControlCreateType $intCreateType rules governing Manufacturer object creation - defaults to CreateOrEdit
* @return ManufacturerMetaControl
*/
public static function Create($objParentObject, $intManufacturerId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit)
{
// Attempt to Load from PK Arguments
if (strlen($intManufacturerId)) {
$objManufacturer = Manufacturer::Load($intManufacturerId);
// Manufacturer was found -- return it!
if ($objManufacturer) {
return new ManufacturerMetaControl($objParentObject, $objManufacturer);
} else {
if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) {
throw new QCallerException('Could not find a Manufacturer object with PK arguments: ' . $intManufacturerId);
}
}
// 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 ManufacturerMetaControl($objParentObject, new Manufacturer());
}
示例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 'InventoryModelId':
// Gets the value for intInventoryModelId (Read-Only PK)
// @return integer
return $this->intInventoryModelId;
case 'CategoryId':
// Gets the value for intCategoryId
// @return integer
return $this->intCategoryId;
case 'ManufacturerId':
// Gets the value for intManufacturerId
// @return integer
return $this->intManufacturerId;
case 'InventoryModelCode':
// Gets the value for strInventoryModelCode (Unique)
// @return string
return $this->strInventoryModelCode;
case 'ShortDescription':
// Gets the value for strShortDescription (Not Null)
// @return string
return $this->strShortDescription;
case 'LongDescription':
// Gets the value for strLongDescription
// @return string
return $this->strLongDescription;
case 'ImagePath':
// Gets the value for strImagePath
// @return string
return $this->strImagePath;
case 'Price':
// Gets the value for fltPrice
// @return double
return $this->fltPrice;
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 'Category':
// Gets the value for the Category object referenced by intCategoryId
// @return Category
try {
if (!$this->objCategory && !is_null($this->intCategoryId)) {
$this->objCategory = Category::Load($this->intCategoryId);
}
return $this->objCategory;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'Manufacturer':
// Gets the value for the Manufacturer object referenced by intManufacturerId
// @return Manufacturer
try {
if (!$this->objManufacturer && !is_null($this->intManufacturerId)) {
$this->objManufacturer = Manufacturer::Load($this->intManufacturerId);
}
return $this->objManufacturer;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'CreatedByObject':
// Gets the value for the UserAccount object referenced by intCreatedBy
// @return UserAccount
try {
if (!$this->objCreatedByObject && !is_null($this->intCreatedBy)) {
$this->objCreatedByObject = UserAccount::Load($this->intCreatedBy);
}
return $this->objCreatedByObject;
} catch (QCallerException $objExc) {
//.........这里部分代码省略.........