Exemple #1
0
 protected function pxyEditFundSignupPayment_Click($strFormid, $strControlId, $strParameter)
 {
     $this->strEditingCode = substr($strParameter, 0, 1);
     $objSignupPayment = SignupPayment::Load(substr($strParameter, 1));
     if ($objSignupPayment->CreditCardPayment->PaypalBatchId == $this->objBatch->Id) {
         $this->objEditing = $objSignupPayment;
         $this->lblDialogSplitFund->Text = 'Please specify the Funding account Details for the two separate line items you wish to split into The amount to be split is: $' . $objSignupPayment->Amount;
         if ($this->strEditingCode == 'd') {
             $this->lstDialogFund->SelectedValue = $objSignupPayment->DonationStewardshipFundId;
         } else {
             throw new Exception('Should Not Be Here -- Event Funds No Longer Editable');
         }
         $this->dlgEditFund->ShowDialogBox();
         $this->lstDialogFund_Change();
     }
 }
Exemple #2
0
 /**
  * Reload this SignupPayment 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 SignupPayment object.');
     }
     // Reload the Object
     $objReloaded = SignupPayment::Load($this->intId);
     // Update $this's local variables to match
     $this->SignupEntryId = $objReloaded->SignupEntryId;
     $this->SignupPaymentTypeId = $objReloaded->SignupPaymentTypeId;
     $this->dttTransactionDate = $objReloaded->dttTransactionDate;
     $this->strTransactionDescription = $objReloaded->strTransactionDescription;
     $this->fltAmount = $objReloaded->fltAmount;
     $this->strFundingAccount = $objReloaded->strFundingAccount;
     $this->DonationStewardshipFundId = $objReloaded->DonationStewardshipFundId;
     $this->fltAmountDonation = $objReloaded->fltAmountDonation;
     $this->fltAmountNonDonation = $objReloaded->fltAmountNonDonation;
     $this->CreditCardPaymentId = $objReloaded->CreditCardPaymentId;
 }
 /**
  * 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 SignupPaymentMetaControl
  * @param integer $intId primary key value
  * @param QMetaControlCreateType $intCreateType rules governing SignupPayment object creation - defaults to CreateOrEdit
  * @return SignupPaymentMetaControl
  */
 public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit)
 {
     // Attempt to Load from PK Arguments
     if (strlen($intId)) {
         $objSignupPayment = SignupPayment::Load($intId);
         // SignupPayment was found -- return it!
         if ($objSignupPayment) {
             return new SignupPaymentMetaControl($objParentObject, $objSignupPayment);
         } else {
             if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) {
                 throw new QCallerException('Could not find a SignupPayment 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 SignupPaymentMetaControl($objParentObject, new SignupPayment());
 }
 /**
  * This will save this object's CreditCardPayment instance,
  * updating only the fields which have had a control created for it.
  */
 public function SaveCreditCardPayment()
 {
     try {
         // Update any fields for controls that have been created
         if ($this->lstCreditCardStatusType) {
             $this->objCreditCardPayment->CreditCardStatusTypeId = $this->lstCreditCardStatusType->SelectedValue;
         }
         if ($this->lstCreditCardType) {
             $this->objCreditCardPayment->CreditCardTypeId = $this->lstCreditCardType->SelectedValue;
         }
         if ($this->txtCreditCardLastFour) {
             $this->objCreditCardPayment->CreditCardLastFour = $this->txtCreditCardLastFour->Text;
         }
         if ($this->txtTransactionCode) {
             $this->objCreditCardPayment->TransactionCode = $this->txtTransactionCode->Text;
         }
         if ($this->txtAuthorizationCode) {
             $this->objCreditCardPayment->AuthorizationCode = $this->txtAuthorizationCode->Text;
         }
         if ($this->txtAddressMatchCode) {
             $this->objCreditCardPayment->AddressMatchCode = $this->txtAddressMatchCode->Text;
         }
         if ($this->calDateAuthorized) {
             $this->objCreditCardPayment->DateAuthorized = $this->calDateAuthorized->DateTime;
         }
         if ($this->calDateCaptured) {
             $this->objCreditCardPayment->DateCaptured = $this->calDateCaptured->DateTime;
         }
         if ($this->txtAmountCharged) {
             $this->objCreditCardPayment->AmountCharged = $this->txtAmountCharged->Text;
         }
         if ($this->txtAmountFee) {
             $this->objCreditCardPayment->AmountFee = $this->txtAmountFee->Text;
         }
         if ($this->txtAmountCleared) {
             $this->objCreditCardPayment->AmountCleared = $this->txtAmountCleared->Text;
         }
         if ($this->lstPaypalBatch) {
             $this->objCreditCardPayment->PaypalBatchId = $this->lstPaypalBatch->SelectedValue;
         }
         if ($this->chkUnlinkedFlag) {
             $this->objCreditCardPayment->UnlinkedFlag = $this->chkUnlinkedFlag->Checked;
         }
         if ($this->lstStewardshipContribution) {
             $this->objCreditCardPayment->StewardshipContributionId = $this->lstStewardshipContribution->SelectedValue;
         }
         // Update any UniqueReverseReferences (if any) for controls that have been created for it
         if ($this->lstOnlineDonation) {
             $this->objCreditCardPayment->OnlineDonation = OnlineDonation::Load($this->lstOnlineDonation->SelectedValue);
         }
         if ($this->lstSignupPayment) {
             $this->objCreditCardPayment->SignupPayment = SignupPayment::Load($this->lstSignupPayment->SelectedValue);
         }
         // Save the CreditCardPayment object
         $this->objCreditCardPayment->Save();
         // Finally, update any ManyToManyReferences (if any)
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
 }