/** * 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 'SignupEntryId': // Gets the value for intSignupEntryId (Not Null) // @return integer return $this->intSignupEntryId; case 'SignupPaymentTypeId': // Gets the value for intSignupPaymentTypeId (Not Null) // @return integer return $this->intSignupPaymentTypeId; case 'TransactionDate': // Gets the value for dttTransactionDate // @return QDateTime return $this->dttTransactionDate; case 'TransactionDescription': // Gets the value for strTransactionDescription // @return string return $this->strTransactionDescription; case 'Amount': // Gets the value for fltAmount // @return double return $this->fltAmount; case 'FundingAccount': // Gets the value for strFundingAccount // @return string return $this->strFundingAccount; case 'DonationStewardshipFundId': // Gets the value for intDonationStewardshipFundId // @return integer return $this->intDonationStewardshipFundId; case 'AmountDonation': // Gets the value for fltAmountDonation // @return double return $this->fltAmountDonation; case 'AmountNonDonation': // Gets the value for fltAmountNonDonation // @return double return $this->fltAmountNonDonation; case 'CreditCardPaymentId': // Gets the value for intCreditCardPaymentId (Unique) // @return integer return $this->intCreditCardPaymentId; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'SignupEntry': // Gets the value for the SignupEntry object referenced by intSignupEntryId (Not Null) // @return SignupEntry try { if (!$this->objSignupEntry && !is_null($this->intSignupEntryId)) { $this->objSignupEntry = SignupEntry::Load($this->intSignupEntryId); } return $this->objSignupEntry; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'DonationStewardshipFund': // Gets the value for the StewardshipFund object referenced by intDonationStewardshipFundId // @return StewardshipFund try { if (!$this->objDonationStewardshipFund && !is_null($this->intDonationStewardshipFundId)) { $this->objDonationStewardshipFund = StewardshipFund::Load($this->intDonationStewardshipFundId); } return $this->objDonationStewardshipFund; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'CreditCardPayment': // Gets the value for the CreditCardPayment object referenced by intCreditCardPaymentId (Unique) // @return CreditCardPayment try { if (!$this->objCreditCardPayment && !is_null($this->intCreditCardPaymentId)) { $this->objCreditCardPayment = CreditCardPayment::Load($this->intCreditCardPaymentId); } 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 '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Reload this CreditCardPayment 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 CreditCardPayment object.'); } // Reload the Object $objReloaded = CreditCardPayment::Load($this->intId); // Update $this's local variables to match $this->CreditCardStatusTypeId = $objReloaded->CreditCardStatusTypeId; $this->CreditCardTypeId = $objReloaded->CreditCardTypeId; $this->strCreditCardLastFour = $objReloaded->strCreditCardLastFour; $this->strTransactionCode = $objReloaded->strTransactionCode; $this->strAuthorizationCode = $objReloaded->strAuthorizationCode; $this->strAddressMatchCode = $objReloaded->strAddressMatchCode; $this->dttDateAuthorized = $objReloaded->dttDateAuthorized; $this->dttDateCaptured = $objReloaded->dttDateCaptured; $this->fltAmountCharged = $objReloaded->fltAmountCharged; $this->fltAmountFee = $objReloaded->fltAmountFee; $this->fltAmountCleared = $objReloaded->fltAmountCleared; $this->PaypalBatchId = $objReloaded->PaypalBatchId; $this->blnUnlinkedFlag = $objReloaded->blnUnlinkedFlag; $this->StewardshipContributionId = $objReloaded->StewardshipContributionId; }
/** * This will save this object's StewardshipContribution instance, * updating only the fields which have had a control created for it. */ public function SaveStewardshipContribution() { try { // Update any fields for controls that have been created if ($this->lstPerson) { $this->objStewardshipContribution->PersonId = $this->lstPerson->SelectedValue; } if ($this->lstStewardshipContributionType) { $this->objStewardshipContribution->StewardshipContributionTypeId = $this->lstStewardshipContributionType->SelectedValue; } if ($this->lstStewardshipBatch) { $this->objStewardshipContribution->StewardshipBatchId = $this->lstStewardshipBatch->SelectedValue; } if ($this->lstStewardshipStack) { $this->objStewardshipContribution->StewardshipStackId = $this->lstStewardshipStack->SelectedValue; } if ($this->lstCheckingAccountLookup) { $this->objStewardshipContribution->CheckingAccountLookupId = $this->lstCheckingAccountLookup->SelectedValue; } if ($this->txtTotalAmount) { $this->objStewardshipContribution->TotalAmount = $this->txtTotalAmount->Text; } if ($this->calDateEntered) { $this->objStewardshipContribution->DateEntered = $this->calDateEntered->DateTime; } if ($this->calDateCleared) { $this->objStewardshipContribution->DateCleared = $this->calDateCleared->DateTime; } if ($this->calDateCredited) { $this->objStewardshipContribution->DateCredited = $this->calDateCredited->DateTime; } if ($this->txtCheckNumber) { $this->objStewardshipContribution->CheckNumber = $this->txtCheckNumber->Text; } if ($this->txtAuthorizationNumber) { $this->objStewardshipContribution->AuthorizationNumber = $this->txtAuthorizationNumber->Text; } if ($this->txtAlternateSource) { $this->objStewardshipContribution->AlternateSource = $this->txtAlternateSource->Text; } if ($this->chkNonDeductibleFlag) { $this->objStewardshipContribution->NonDeductibleFlag = $this->chkNonDeductibleFlag->Checked; } if ($this->txtNote) { $this->objStewardshipContribution->Note = $this->txtNote->Text; } if ($this->lstCreatedByLogin) { $this->objStewardshipContribution->CreatedByLoginId = $this->lstCreatedByLogin->SelectedValue; } if ($this->chkUnpostedFlag) { $this->objStewardshipContribution->UnpostedFlag = $this->chkUnpostedFlag->Checked; } // Update any UniqueReverseReferences (if any) for controls that have been created for it if ($this->lstCreditCardPayment) { $this->objStewardshipContribution->CreditCardPayment = CreditCardPayment::Load($this->lstCreditCardPayment->SelectedValue); } // Save the StewardshipContribution object $this->objStewardshipContribution->Save(); // Finally, update any ManyToManyReferences (if any) } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } }
/** * 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 'ConfirmationEmail': // Gets the value for strConfirmationEmail // @return string return $this->strConfirmationEmail; case 'Amount': // Gets the value for fltAmount // @return double return $this->fltAmount; case 'CreditCardPaymentId': // Gets the value for intCreditCardPaymentId (Unique) // @return integer return $this->intCreditCardPaymentId; case 'IsRecurringFlag': // Gets the value for blnIsRecurringFlag // @return boolean return $this->blnIsRecurringFlag; case 'Status': // Gets the value for intStatus // @return integer return $this->intStatus; case 'RecurringPaymentId': // Gets the value for intRecurringPaymentId // @return integer return $this->intRecurringPaymentId; /////////////////// // 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 'CreditCardPayment': // Gets the value for the CreditCardPayment object referenced by intCreditCardPaymentId (Unique) // @return CreditCardPayment try { if (!$this->objCreditCardPayment && !is_null($this->intCreditCardPaymentId)) { $this->objCreditCardPayment = CreditCardPayment::Load($this->intCreditCardPaymentId); } return $this->objCreditCardPayment; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'RecurringPayment': // Gets the value for the RecurringPayments object referenced by intRecurringPaymentId // @return RecurringPayments try { if (!$this->objRecurringPayment && !is_null($this->intRecurringPaymentId)) { $this->objRecurringPayment = RecurringPayments::Load($this->intRecurringPaymentId); } return $this->objRecurringPayment; } 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 '_OnlineDonationLineItem': // Gets the value for the private _objOnlineDonationLineItem (Read-Only) // if set due to an expansion on the online_donation_line_item.online_donation_id reverse relationship // @return OnlineDonationLineItem return $this->_objOnlineDonationLineItem; case '_OnlineDonationLineItemArray': // Gets the value for the private _objOnlineDonationLineItemArray (Read-Only) // if set due to an ExpandAsArray on the online_donation_line_item.online_donation_id reverse relationship // @return OnlineDonationLineItem[] return (array) $this->_objOnlineDonationLineItemArray; 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 CreditCardPaymentMetaControl * @param integer $intId primary key value * @param QMetaControlCreateType $intCreateType rules governing CreditCardPayment object creation - defaults to CreateOrEdit * @return CreditCardPaymentMetaControl */ public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) { // Attempt to Load from PK Arguments if (strlen($intId)) { $objCreditCardPayment = CreditCardPayment::Load($intId); // CreditCardPayment was found -- return it! if ($objCreditCardPayment) { return new CreditCardPaymentMetaControl($objParentObject, $objCreditCardPayment); } else { if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) { throw new QCallerException('Could not find a CreditCardPayment 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 CreditCardPaymentMetaControl($objParentObject, new CreditCardPayment()); }
protected function btnSplitSave_Click() { if (strtolower(trim($this->txtSplitNameCurrent->Text)) == strtolower(trim($this->txtSplitNameNew->Text))) { QApplication::DisplayAlert('PayPal Batch Name/Numbers must be different.'); return; } $this->objBatch->SplitBatch(trim($this->txtSplitNameCurrent->Text), trim($this->txtSplitNameNew->Text), CreditCardPayment::Load($this->lstSplitItem->SelectedValue)); QApplication::Redirect('/stewardship/paypal'); }