/** * Reload this CheckingAccountLookup 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 CheckingAccountLookup object.'); } // Reload the Object $objReloaded = CheckingAccountLookup::Load($this->intId); // Update $this's local variables to match $this->strTransitHash = $objReloaded->strTransitHash; $this->strAccountHash = $objReloaded->strAccountHash; }
protected function lstCheckingAccountLookups_Update() { if ($this->lstCheckingAccountLookups) { $this->objPerson->UnassociateAllCheckingAccountLookups(); $objSelectedListItems = $this->lstCheckingAccountLookups->SelectedItems; if ($objSelectedListItems) { foreach ($objSelectedListItems as $objListItem) { $this->objPerson->AssociateCheckingAccountLookup(CheckingAccountLookup::Load($objListItem->Value)); } } } }
/** * 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 CheckingAccountLookupMetaControl * @param integer $intId primary key value * @param QMetaControlCreateType $intCreateType rules governing CheckingAccountLookup object creation - defaults to CreateOrEdit * @return CheckingAccountLookupMetaControl */ public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) { // Attempt to Load from PK Arguments if (strlen($intId)) { $objCheckingAccountLookup = CheckingAccountLookup::Load($intId); // CheckingAccountLookup was found -- return it! if ($objCheckingAccountLookup) { return new CheckingAccountLookupMetaControl($objParentObject, $objCheckingAccountLookup); } else { if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) { throw new QCallerException('Could not find a CheckingAccountLookup 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 CheckingAccountLookupMetaControl($objParentObject, new CheckingAccountLookup()); }
/** * 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 'PersonId': // Gets the value for intPersonId (Not Null) // @return integer return $this->intPersonId; case 'StewardshipContributionTypeId': // Gets the value for intStewardshipContributionTypeId (Not Null) // @return integer return $this->intStewardshipContributionTypeId; case 'StewardshipBatchId': // Gets the value for intStewardshipBatchId (Not Null) // @return integer return $this->intStewardshipBatchId; case 'StewardshipStackId': // Gets the value for intStewardshipStackId // @return integer return $this->intStewardshipStackId; case 'CheckingAccountLookupId': // Gets the value for intCheckingAccountLookupId // @return integer return $this->intCheckingAccountLookupId; case 'TotalAmount': // Gets the value for fltTotalAmount // @return double return $this->fltTotalAmount; case 'DateEntered': // Gets the value for dttDateEntered (Not Null) // @return QDateTime return $this->dttDateEntered; case 'DateCleared': // Gets the value for dttDateCleared // @return QDateTime return $this->dttDateCleared; case 'DateCredited': // Gets the value for dttDateCredited (Not Null) // @return QDateTime return $this->dttDateCredited; case 'CheckNumber': // Gets the value for strCheckNumber // @return string return $this->strCheckNumber; case 'AuthorizationNumber': // Gets the value for strAuthorizationNumber // @return string return $this->strAuthorizationNumber; case 'AlternateSource': // Gets the value for strAlternateSource // @return string return $this->strAlternateSource; case 'NonDeductibleFlag': // Gets the value for blnNonDeductibleFlag // @return boolean return $this->blnNonDeductibleFlag; case 'Note': // Gets the value for strNote // @return string return $this->strNote; case 'CreatedByLoginId': // Gets the value for intCreatedByLoginId (Not Null) // @return integer return $this->intCreatedByLoginId; case 'UnpostedFlag': // Gets the value for blnUnpostedFlag // @return boolean return $this->blnUnpostedFlag; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'Person': // Gets the value for the Person object referenced by intPersonId (Not Null) // @return Person try { if (!$this->objPerson && !is_null($this->intPersonId)) { $this->objPerson = Person::Load($this->intPersonId); } return $this->objPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'StewardshipBatch': // Gets the value for the StewardshipBatch object referenced by intStewardshipBatchId (Not Null) // @return StewardshipBatch try { if (!$this->objStewardshipBatch && !is_null($this->intStewardshipBatchId)) { $this->objStewardshipBatch = StewardshipBatch::Load($this->intStewardshipBatchId); } return $this->objStewardshipBatch; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'StewardshipStack': // Gets the value for the StewardshipStack object referenced by intStewardshipStackId // @return StewardshipStack try { if (!$this->objStewardshipStack && !is_null($this->intStewardshipStackId)) { $this->objStewardshipStack = StewardshipStack::Load($this->intStewardshipStackId); } return $this->objStewardshipStack; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'CheckingAccountLookup': // Gets the value for the CheckingAccountLookup object referenced by intCheckingAccountLookupId // @return CheckingAccountLookup try { if (!$this->objCheckingAccountLookup && !is_null($this->intCheckingAccountLookupId)) { $this->objCheckingAccountLookup = CheckingAccountLookup::Load($this->intCheckingAccountLookupId); } return $this->objCheckingAccountLookup; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'CreatedByLogin': // Gets the value for the Login object referenced by intCreatedByLoginId (Not Null) // @return Login try { if (!$this->objCreatedByLogin && !is_null($this->intCreatedByLoginId)) { $this->objCreatedByLogin = Login::Load($this->intCreatedByLoginId); } return $this->objCreatedByLogin; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'CreditCardPayment': // Gets the value for the CreditCardPayment object that uniquely references this StewardshipContribution // by objCreditCardPayment (Unique) // @return CreditCardPayment try { if ($this->objCreditCardPayment === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objCreditCardPayment) { $this->objCreditCardPayment = CreditCardPayment::LoadByStewardshipContributionId($this->intId); } return $this->objCreditCardPayment; } 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 '_StewardshipContributionAmount': // Gets the value for the private _objStewardshipContributionAmount (Read-Only) // if set due to an expansion on the stewardship_contribution_amount.stewardship_contribution_id reverse relationship // @return StewardshipContributionAmount return $this->_objStewardshipContributionAmount; case '_StewardshipContributionAmountArray': // Gets the value for the private _objStewardshipContributionAmountArray (Read-Only) // if set due to an ExpandAsArray on the stewardship_contribution_amount.stewardship_contribution_id reverse relationship // @return StewardshipContributionAmount[] return (array) $this->_objStewardshipContributionAmountArray; case '_StewardshipPostLineItem': // Gets the value for the private _objStewardshipPostLineItem (Read-Only) // if set due to an expansion on the stewardship_post_line_item.stewardship_contribution_id reverse relationship // @return StewardshipPostLineItem return $this->_objStewardshipPostLineItem; case '_StewardshipPostLineItemArray': // Gets the value for the private _objStewardshipPostLineItemArray (Read-Only) // if set due to an ExpandAsArray on the stewardship_post_line_item.stewardship_contribution_id reverse relationship // @return StewardshipPostLineItem[] return (array) $this->_objStewardshipPostLineItemArray; case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }