Ejemplo n.º 1
0
 /**
  * Reload this ClassifiedCategory 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 ClassifiedCategory object.');
     }
     // Reload the Object
     $objReloaded = ClassifiedCategory::Load($this->intId);
     // Update $this's local variables to match
     $this->strName = $objReloaded->strName;
     $this->strToken = $objReloaded->strToken;
     $this->intOrderNumber = $objReloaded->intOrderNumber;
     $this->strDescription = $objReloaded->strDescription;
     $this->strInstructions = $objReloaded->strInstructions;
     $this->strDisclaimer = $objReloaded->strDisclaimer;
 }
Ejemplo n.º 2
0
 /**
  * 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 'Id':
             // Gets the value for intId (Read-Only PK)
             // @return integer
             return $this->intId;
         case 'ClassifiedCategoryId':
             // Gets the value for intClassifiedCategoryId (Not Null)
             // @return integer
             return $this->intClassifiedCategoryId;
         case 'ApprovalFlag':
             // Gets the value for blnApprovalFlag (Not Null)
             // @return boolean
             return $this->blnApprovalFlag;
         case 'Title':
             // Gets the value for strTitle
             // @return string
             return $this->strTitle;
         case 'Content':
             // Gets the value for strContent
             // @return string
             return $this->strContent;
         case 'DatePosted':
             // Gets the value for dttDatePosted
             // @return QDateTime
             return $this->dttDatePosted;
         case 'DateExpired':
             // Gets the value for dttDateExpired (Not Null)
             // @return QDateTime
             return $this->dttDateExpired;
         case 'Name':
             // Gets the value for strName
             // @return string
             return $this->strName;
         case 'Phone':
             // Gets the value for strPhone
             // @return string
             return $this->strPhone;
         case 'Email':
             // Gets the value for strEmail
             // @return string
             return $this->strEmail;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'ClassifiedCategory':
             // Gets the value for the ClassifiedCategory object referenced by intClassifiedCategoryId (Not Null)
             // @return ClassifiedCategory
             try {
                 if (!$this->objClassifiedCategory && !is_null($this->intClassifiedCategoryId)) {
                     $this->objClassifiedCategory = ClassifiedCategory::Load($this->intClassifiedCategoryId);
                 }
                 return $this->objClassifiedCategory;
             } 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;
             }
     }
 }
 /**
  * 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 ClassifiedCategoryMetaControl
  * @param integer $intId primary key value
  * @param QMetaControlCreateType $intCreateType rules governing ClassifiedCategory object creation - defaults to CreateOrEdit
  * @return ClassifiedCategoryMetaControl
  */
 public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit)
 {
     // Attempt to Load from PK Arguments
     if (strlen($intId)) {
         $objClassifiedCategory = ClassifiedCategory::Load($intId);
         // ClassifiedCategory was found -- return it!
         if ($objClassifiedCategory) {
             return new ClassifiedCategoryMetaControl($objParentObject, $objClassifiedCategory);
         } else {
             if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) {
                 throw new QCallerException('Could not find a ClassifiedCategory object with PK arguments: ' . $intId);
             }
         }
         // 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 ClassifiedCategoryMetaControl($objParentObject, new ClassifiedCategory());
 }
Ejemplo n.º 4
0
 public function pxyMoveUp_Click($strFormId, $strControlId, $strParameter)
 {
     $objObject = ClassifiedCategory::Load($strParameter);
     $objObject->MoveUp();
     $this->dtgCategories->Refresh();
 }