コード例 #1
0
 /**
  * Refresh this MetaControl with Data from the local SignupPayment object.
  * @param boolean $blnReload reload SignupPayment from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objSignupPayment->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objSignupPayment->Id;
         }
     }
     if ($this->lstSignupEntry) {
         $this->lstSignupEntry->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstSignupEntry->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objSignupEntryArray = SignupEntry::LoadAll();
         if ($objSignupEntryArray) {
             foreach ($objSignupEntryArray as $objSignupEntry) {
                 $objListItem = new QListItem($objSignupEntry->__toString(), $objSignupEntry->Id);
                 if ($this->objSignupPayment->SignupEntry && $this->objSignupPayment->SignupEntry->Id == $objSignupEntry->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSignupEntry->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSignupEntryId) {
         $this->lblSignupEntryId->Text = $this->objSignupPayment->SignupEntry ? $this->objSignupPayment->SignupEntry->__toString() : null;
     }
     if ($this->lstSignupPaymentType) {
         $this->lstSignupPaymentType->SelectedValue = $this->objSignupPayment->SignupPaymentTypeId;
     }
     if ($this->lblSignupPaymentTypeId) {
         $this->lblSignupPaymentTypeId->Text = $this->objSignupPayment->SignupPaymentTypeId ? SignupPaymentType::$NameArray[$this->objSignupPayment->SignupPaymentTypeId] : null;
     }
     if ($this->calTransactionDate) {
         $this->calTransactionDate->DateTime = $this->objSignupPayment->TransactionDate;
     }
     if ($this->lblTransactionDate) {
         $this->lblTransactionDate->Text = sprintf($this->objSignupPayment->TransactionDate) ? $this->objSignupPayment->__toString($this->strTransactionDateDateTimeFormat) : null;
     }
     if ($this->txtTransactionDescription) {
         $this->txtTransactionDescription->Text = $this->objSignupPayment->TransactionDescription;
     }
     if ($this->lblTransactionDescription) {
         $this->lblTransactionDescription->Text = $this->objSignupPayment->TransactionDescription;
     }
     if ($this->txtAmount) {
         $this->txtAmount->Text = $this->objSignupPayment->Amount;
     }
     if ($this->lblAmount) {
         $this->lblAmount->Text = $this->objSignupPayment->Amount;
     }
     if ($this->txtFundingAccount) {
         $this->txtFundingAccount->Text = $this->objSignupPayment->FundingAccount;
     }
     if ($this->lblFundingAccount) {
         $this->lblFundingAccount->Text = $this->objSignupPayment->FundingAccount;
     }
     if ($this->lstDonationStewardshipFund) {
         $this->lstDonationStewardshipFund->RemoveAllItems();
         $this->lstDonationStewardshipFund->AddItem(QApplication::Translate('- Select One -'), null);
         $objDonationStewardshipFundArray = StewardshipFund::LoadAll();
         if ($objDonationStewardshipFundArray) {
             foreach ($objDonationStewardshipFundArray as $objDonationStewardshipFund) {
                 $objListItem = new QListItem($objDonationStewardshipFund->__toString(), $objDonationStewardshipFund->Id);
                 if ($this->objSignupPayment->DonationStewardshipFund && $this->objSignupPayment->DonationStewardshipFund->Id == $objDonationStewardshipFund->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstDonationStewardshipFund->AddItem($objListItem);
             }
         }
     }
     if ($this->lblDonationStewardshipFundId) {
         $this->lblDonationStewardshipFundId->Text = $this->objSignupPayment->DonationStewardshipFund ? $this->objSignupPayment->DonationStewardshipFund->__toString() : null;
     }
     if ($this->txtAmountDonation) {
         $this->txtAmountDonation->Text = $this->objSignupPayment->AmountDonation;
     }
     if ($this->lblAmountDonation) {
         $this->lblAmountDonation->Text = $this->objSignupPayment->AmountDonation;
     }
     if ($this->txtAmountNonDonation) {
         $this->txtAmountNonDonation->Text = $this->objSignupPayment->AmountNonDonation;
     }
     if ($this->lblAmountNonDonation) {
         $this->lblAmountNonDonation->Text = $this->objSignupPayment->AmountNonDonation;
     }
     if ($this->lstCreditCardPayment) {
         $this->lstCreditCardPayment->RemoveAllItems();
         $this->lstCreditCardPayment->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreditCardPaymentArray = CreditCardPayment::LoadAll();
         if ($objCreditCardPaymentArray) {
             foreach ($objCreditCardPaymentArray as $objCreditCardPayment) {
                 $objListItem = new QListItem($objCreditCardPayment->__toString(), $objCreditCardPayment->Id);
                 if ($this->objSignupPayment->CreditCardPayment && $this->objSignupPayment->CreditCardPayment->Id == $objCreditCardPayment->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreditCardPayment->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreditCardPaymentId) {
         $this->lblCreditCardPaymentId->Text = $this->objSignupPayment->CreditCardPayment ? $this->objSignupPayment->CreditCardPayment->__toString() : null;
     }
 }
コード例 #2
0
 /**
  * Refresh this MetaControl with Data from the local OnlineDonation object.
  * @param boolean $blnReload reload OnlineDonation from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objOnlineDonation->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objOnlineDonation->Id;
         }
     }
     if ($this->lstPerson) {
         $this->lstPerson->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstPerson->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objPersonArray = Person::LoadAll();
         if ($objPersonArray) {
             foreach ($objPersonArray as $objPerson) {
                 $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id);
                 if ($this->objOnlineDonation->Person && $this->objOnlineDonation->Person->Id == $objPerson->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPerson->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPersonId) {
         $this->lblPersonId->Text = $this->objOnlineDonation->Person ? $this->objOnlineDonation->Person->__toString() : null;
     }
     if ($this->txtConfirmationEmail) {
         $this->txtConfirmationEmail->Text = $this->objOnlineDonation->ConfirmationEmail;
     }
     if ($this->lblConfirmationEmail) {
         $this->lblConfirmationEmail->Text = $this->objOnlineDonation->ConfirmationEmail;
     }
     if ($this->txtAmount) {
         $this->txtAmount->Text = $this->objOnlineDonation->Amount;
     }
     if ($this->lblAmount) {
         $this->lblAmount->Text = $this->objOnlineDonation->Amount;
     }
     if ($this->lstCreditCardPayment) {
         $this->lstCreditCardPayment->RemoveAllItems();
         $this->lstCreditCardPayment->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreditCardPaymentArray = CreditCardPayment::LoadAll();
         if ($objCreditCardPaymentArray) {
             foreach ($objCreditCardPaymentArray as $objCreditCardPayment) {
                 $objListItem = new QListItem($objCreditCardPayment->__toString(), $objCreditCardPayment->Id);
                 if ($this->objOnlineDonation->CreditCardPayment && $this->objOnlineDonation->CreditCardPayment->Id == $objCreditCardPayment->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreditCardPayment->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreditCardPaymentId) {
         $this->lblCreditCardPaymentId->Text = $this->objOnlineDonation->CreditCardPayment ? $this->objOnlineDonation->CreditCardPayment->__toString() : null;
     }
     if ($this->chkIsRecurringFlag) {
         $this->chkIsRecurringFlag->Checked = $this->objOnlineDonation->IsRecurringFlag;
     }
     if ($this->lblIsRecurringFlag) {
         $this->lblIsRecurringFlag->Text = $this->objOnlineDonation->IsRecurringFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->txtStatus) {
         $this->txtStatus->Text = $this->objOnlineDonation->Status;
     }
     if ($this->lblStatus) {
         $this->lblStatus->Text = $this->objOnlineDonation->Status;
     }
     if ($this->lstRecurringPayment) {
         $this->lstRecurringPayment->RemoveAllItems();
         $this->lstRecurringPayment->AddItem(QApplication::Translate('- Select One -'), null);
         $objRecurringPaymentArray = RecurringPayments::LoadAll();
         if ($objRecurringPaymentArray) {
             foreach ($objRecurringPaymentArray as $objRecurringPayment) {
                 $objListItem = new QListItem($objRecurringPayment->__toString(), $objRecurringPayment->Id);
                 if ($this->objOnlineDonation->RecurringPayment && $this->objOnlineDonation->RecurringPayment->Id == $objRecurringPayment->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstRecurringPayment->AddItem($objListItem);
             }
         }
     }
     if ($this->lblRecurringPaymentId) {
         $this->lblRecurringPaymentId->Text = $this->objOnlineDonation->RecurringPayment ? $this->objOnlineDonation->RecurringPayment->__toString() : null;
     }
 }
コード例 #3
0
 /**
  * Refresh this MetaControl with Data from the local StewardshipContribution object.
  * @param boolean $blnReload reload StewardshipContribution from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objStewardshipContribution->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objStewardshipContribution->Id;
         }
     }
     if ($this->lstPerson) {
         $this->lstPerson->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstPerson->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objPersonArray = Person::LoadAll();
         if ($objPersonArray) {
             foreach ($objPersonArray as $objPerson) {
                 $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id);
                 if ($this->objStewardshipContribution->Person && $this->objStewardshipContribution->Person->Id == $objPerson->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPerson->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPersonId) {
         $this->lblPersonId->Text = $this->objStewardshipContribution->Person ? $this->objStewardshipContribution->Person->__toString() : null;
     }
     if ($this->lstStewardshipContributionType) {
         $this->lstStewardshipContributionType->SelectedValue = $this->objStewardshipContribution->StewardshipContributionTypeId;
     }
     if ($this->lblStewardshipContributionTypeId) {
         $this->lblStewardshipContributionTypeId->Text = $this->objStewardshipContribution->StewardshipContributionTypeId ? StewardshipContributionType::$NameArray[$this->objStewardshipContribution->StewardshipContributionTypeId] : null;
     }
     if ($this->lstStewardshipBatch) {
         $this->lstStewardshipBatch->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstStewardshipBatch->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objStewardshipBatchArray = StewardshipBatch::LoadAll();
         if ($objStewardshipBatchArray) {
             foreach ($objStewardshipBatchArray as $objStewardshipBatch) {
                 $objListItem = new QListItem($objStewardshipBatch->__toString(), $objStewardshipBatch->Id);
                 if ($this->objStewardshipContribution->StewardshipBatch && $this->objStewardshipContribution->StewardshipBatch->Id == $objStewardshipBatch->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstStewardshipBatch->AddItem($objListItem);
             }
         }
     }
     if ($this->lblStewardshipBatchId) {
         $this->lblStewardshipBatchId->Text = $this->objStewardshipContribution->StewardshipBatch ? $this->objStewardshipContribution->StewardshipBatch->__toString() : null;
     }
     if ($this->lstStewardshipStack) {
         $this->lstStewardshipStack->RemoveAllItems();
         $this->lstStewardshipStack->AddItem(QApplication::Translate('- Select One -'), null);
         $objStewardshipStackArray = StewardshipStack::LoadAll();
         if ($objStewardshipStackArray) {
             foreach ($objStewardshipStackArray as $objStewardshipStack) {
                 $objListItem = new QListItem($objStewardshipStack->__toString(), $objStewardshipStack->Id);
                 if ($this->objStewardshipContribution->StewardshipStack && $this->objStewardshipContribution->StewardshipStack->Id == $objStewardshipStack->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstStewardshipStack->AddItem($objListItem);
             }
         }
     }
     if ($this->lblStewardshipStackId) {
         $this->lblStewardshipStackId->Text = $this->objStewardshipContribution->StewardshipStack ? $this->objStewardshipContribution->StewardshipStack->__toString() : null;
     }
     if ($this->lstCheckingAccountLookup) {
         $this->lstCheckingAccountLookup->RemoveAllItems();
         $this->lstCheckingAccountLookup->AddItem(QApplication::Translate('- Select One -'), null);
         $objCheckingAccountLookupArray = CheckingAccountLookup::LoadAll();
         if ($objCheckingAccountLookupArray) {
             foreach ($objCheckingAccountLookupArray as $objCheckingAccountLookup) {
                 $objListItem = new QListItem($objCheckingAccountLookup->__toString(), $objCheckingAccountLookup->Id);
                 if ($this->objStewardshipContribution->CheckingAccountLookup && $this->objStewardshipContribution->CheckingAccountLookup->Id == $objCheckingAccountLookup->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCheckingAccountLookup->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCheckingAccountLookupId) {
         $this->lblCheckingAccountLookupId->Text = $this->objStewardshipContribution->CheckingAccountLookup ? $this->objStewardshipContribution->CheckingAccountLookup->__toString() : null;
     }
     if ($this->txtTotalAmount) {
         $this->txtTotalAmount->Text = $this->objStewardshipContribution->TotalAmount;
     }
     if ($this->lblTotalAmount) {
         $this->lblTotalAmount->Text = $this->objStewardshipContribution->TotalAmount;
     }
     if ($this->calDateEntered) {
         $this->calDateEntered->DateTime = $this->objStewardshipContribution->DateEntered;
     }
     if ($this->lblDateEntered) {
         $this->lblDateEntered->Text = sprintf($this->objStewardshipContribution->DateEntered) ? $this->objStewardshipContribution->__toString($this->strDateEnteredDateTimeFormat) : null;
     }
     if ($this->calDateCleared) {
         $this->calDateCleared->DateTime = $this->objStewardshipContribution->DateCleared;
     }
     if ($this->lblDateCleared) {
         $this->lblDateCleared->Text = sprintf($this->objStewardshipContribution->DateCleared) ? $this->objStewardshipContribution->__toString($this->strDateClearedDateTimeFormat) : null;
     }
     if ($this->calDateCredited) {
         $this->calDateCredited->DateTime = $this->objStewardshipContribution->DateCredited;
     }
     if ($this->lblDateCredited) {
         $this->lblDateCredited->Text = sprintf($this->objStewardshipContribution->DateCredited) ? $this->objStewardshipContribution->__toString($this->strDateCreditedDateTimeFormat) : null;
     }
     if ($this->txtCheckNumber) {
         $this->txtCheckNumber->Text = $this->objStewardshipContribution->CheckNumber;
     }
     if ($this->lblCheckNumber) {
         $this->lblCheckNumber->Text = $this->objStewardshipContribution->CheckNumber;
     }
     if ($this->txtAuthorizationNumber) {
         $this->txtAuthorizationNumber->Text = $this->objStewardshipContribution->AuthorizationNumber;
     }
     if ($this->lblAuthorizationNumber) {
         $this->lblAuthorizationNumber->Text = $this->objStewardshipContribution->AuthorizationNumber;
     }
     if ($this->txtAlternateSource) {
         $this->txtAlternateSource->Text = $this->objStewardshipContribution->AlternateSource;
     }
     if ($this->lblAlternateSource) {
         $this->lblAlternateSource->Text = $this->objStewardshipContribution->AlternateSource;
     }
     if ($this->chkNonDeductibleFlag) {
         $this->chkNonDeductibleFlag->Checked = $this->objStewardshipContribution->NonDeductibleFlag;
     }
     if ($this->lblNonDeductibleFlag) {
         $this->lblNonDeductibleFlag->Text = $this->objStewardshipContribution->NonDeductibleFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->txtNote) {
         $this->txtNote->Text = $this->objStewardshipContribution->Note;
     }
     if ($this->lblNote) {
         $this->lblNote->Text = $this->objStewardshipContribution->Note;
     }
     if ($this->lstCreatedByLogin) {
         $this->lstCreatedByLogin->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstCreatedByLogin->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objCreatedByLoginArray = Login::LoadAll();
         if ($objCreatedByLoginArray) {
             foreach ($objCreatedByLoginArray as $objCreatedByLogin) {
                 $objListItem = new QListItem($objCreatedByLogin->__toString(), $objCreatedByLogin->Id);
                 if ($this->objStewardshipContribution->CreatedByLogin && $this->objStewardshipContribution->CreatedByLogin->Id == $objCreatedByLogin->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreatedByLogin->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreatedByLoginId) {
         $this->lblCreatedByLoginId->Text = $this->objStewardshipContribution->CreatedByLogin ? $this->objStewardshipContribution->CreatedByLogin->__toString() : null;
     }
     if ($this->chkUnpostedFlag) {
         $this->chkUnpostedFlag->Checked = $this->objStewardshipContribution->UnpostedFlag;
     }
     if ($this->lblUnpostedFlag) {
         $this->lblUnpostedFlag->Text = $this->objStewardshipContribution->UnpostedFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->lstCreditCardPayment) {
         $this->lstCreditCardPayment->RemoveAllItems();
         $this->lstCreditCardPayment->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreditCardPaymentArray = CreditCardPayment::LoadAll();
         if ($objCreditCardPaymentArray) {
             foreach ($objCreditCardPaymentArray as $objCreditCardPayment) {
                 $objListItem = new QListItem($objCreditCardPayment->__toString(), $objCreditCardPayment->Id);
                 if ($objCreditCardPayment->StewardshipContributionId == $this->objStewardshipContribution->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreditCardPayment->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreditCardPayment) {
         $this->lblCreditCardPayment->Text = $this->objStewardshipContribution->CreditCardPayment ? $this->objStewardshipContribution->CreditCardPayment->__toString() : null;
     }
 }