/**
  * Refresh this MetaControl with Data from the local CreditCardPayment object.
  * @param boolean $blnReload reload CreditCardPayment from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objCreditCardPayment->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objCreditCardPayment->Id;
         }
     }
     if ($this->lstCreditCardStatusType) {
         $this->lstCreditCardStatusType->SelectedValue = $this->objCreditCardPayment->CreditCardStatusTypeId;
     }
     if ($this->lblCreditCardStatusTypeId) {
         $this->lblCreditCardStatusTypeId->Text = $this->objCreditCardPayment->CreditCardStatusTypeId ? CreditCardStatusType::$NameArray[$this->objCreditCardPayment->CreditCardStatusTypeId] : null;
     }
     if ($this->lstCreditCardType) {
         $this->lstCreditCardType->SelectedValue = $this->objCreditCardPayment->CreditCardTypeId;
     }
     if ($this->lblCreditCardTypeId) {
         $this->lblCreditCardTypeId->Text = $this->objCreditCardPayment->CreditCardTypeId ? CreditCardType::$NameArray[$this->objCreditCardPayment->CreditCardTypeId] : null;
     }
     if ($this->txtCreditCardLastFour) {
         $this->txtCreditCardLastFour->Text = $this->objCreditCardPayment->CreditCardLastFour;
     }
     if ($this->lblCreditCardLastFour) {
         $this->lblCreditCardLastFour->Text = $this->objCreditCardPayment->CreditCardLastFour;
     }
     if ($this->txtTransactionCode) {
         $this->txtTransactionCode->Text = $this->objCreditCardPayment->TransactionCode;
     }
     if ($this->lblTransactionCode) {
         $this->lblTransactionCode->Text = $this->objCreditCardPayment->TransactionCode;
     }
     if ($this->txtAuthorizationCode) {
         $this->txtAuthorizationCode->Text = $this->objCreditCardPayment->AuthorizationCode;
     }
     if ($this->lblAuthorizationCode) {
         $this->lblAuthorizationCode->Text = $this->objCreditCardPayment->AuthorizationCode;
     }
     if ($this->txtAddressMatchCode) {
         $this->txtAddressMatchCode->Text = $this->objCreditCardPayment->AddressMatchCode;
     }
     if ($this->lblAddressMatchCode) {
         $this->lblAddressMatchCode->Text = $this->objCreditCardPayment->AddressMatchCode;
     }
     if ($this->calDateAuthorized) {
         $this->calDateAuthorized->DateTime = $this->objCreditCardPayment->DateAuthorized;
     }
     if ($this->lblDateAuthorized) {
         $this->lblDateAuthorized->Text = sprintf($this->objCreditCardPayment->DateAuthorized) ? $this->objCreditCardPayment->__toString($this->strDateAuthorizedDateTimeFormat) : null;
     }
     if ($this->calDateCaptured) {
         $this->calDateCaptured->DateTime = $this->objCreditCardPayment->DateCaptured;
     }
     if ($this->lblDateCaptured) {
         $this->lblDateCaptured->Text = sprintf($this->objCreditCardPayment->DateCaptured) ? $this->objCreditCardPayment->__toString($this->strDateCapturedDateTimeFormat) : null;
     }
     if ($this->txtAmountCharged) {
         $this->txtAmountCharged->Text = $this->objCreditCardPayment->AmountCharged;
     }
     if ($this->lblAmountCharged) {
         $this->lblAmountCharged->Text = $this->objCreditCardPayment->AmountCharged;
     }
     if ($this->txtAmountFee) {
         $this->txtAmountFee->Text = $this->objCreditCardPayment->AmountFee;
     }
     if ($this->lblAmountFee) {
         $this->lblAmountFee->Text = $this->objCreditCardPayment->AmountFee;
     }
     if ($this->txtAmountCleared) {
         $this->txtAmountCleared->Text = $this->objCreditCardPayment->AmountCleared;
     }
     if ($this->lblAmountCleared) {
         $this->lblAmountCleared->Text = $this->objCreditCardPayment->AmountCleared;
     }
     if ($this->lstPaypalBatch) {
         $this->lstPaypalBatch->RemoveAllItems();
         $this->lstPaypalBatch->AddItem(QApplication::Translate('- Select One -'), null);
         $objPaypalBatchArray = PaypalBatch::LoadAll();
         if ($objPaypalBatchArray) {
             foreach ($objPaypalBatchArray as $objPaypalBatch) {
                 $objListItem = new QListItem($objPaypalBatch->__toString(), $objPaypalBatch->Id);
                 if ($this->objCreditCardPayment->PaypalBatch && $this->objCreditCardPayment->PaypalBatch->Id == $objPaypalBatch->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPaypalBatch->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPaypalBatchId) {
         $this->lblPaypalBatchId->Text = $this->objCreditCardPayment->PaypalBatch ? $this->objCreditCardPayment->PaypalBatch->__toString() : null;
     }
     if ($this->chkUnlinkedFlag) {
         $this->chkUnlinkedFlag->Checked = $this->objCreditCardPayment->UnlinkedFlag;
     }
     if ($this->lblUnlinkedFlag) {
         $this->lblUnlinkedFlag->Text = $this->objCreditCardPayment->UnlinkedFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->lstStewardshipContribution) {
         $this->lstStewardshipContribution->RemoveAllItems();
         $this->lstStewardshipContribution->AddItem(QApplication::Translate('- Select One -'), null);
         $objStewardshipContributionArray = StewardshipContribution::LoadAll();
         if ($objStewardshipContributionArray) {
             foreach ($objStewardshipContributionArray as $objStewardshipContribution) {
                 $objListItem = new QListItem($objStewardshipContribution->__toString(), $objStewardshipContribution->Id);
                 if ($this->objCreditCardPayment->StewardshipContribution && $this->objCreditCardPayment->StewardshipContribution->Id == $objStewardshipContribution->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstStewardshipContribution->AddItem($objListItem);
             }
         }
     }
     if ($this->lblStewardshipContributionId) {
         $this->lblStewardshipContributionId->Text = $this->objCreditCardPayment->StewardshipContribution ? $this->objCreditCardPayment->StewardshipContribution->__toString() : null;
     }
     if ($this->lstOnlineDonation) {
         $this->lstOnlineDonation->RemoveAllItems();
         $this->lstOnlineDonation->AddItem(QApplication::Translate('- Select One -'), null);
         $objOnlineDonationArray = OnlineDonation::LoadAll();
         if ($objOnlineDonationArray) {
             foreach ($objOnlineDonationArray as $objOnlineDonation) {
                 $objListItem = new QListItem($objOnlineDonation->__toString(), $objOnlineDonation->Id);
                 if ($objOnlineDonation->CreditCardPaymentId == $this->objCreditCardPayment->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstOnlineDonation->AddItem($objListItem);
             }
         }
     }
     if ($this->lblOnlineDonation) {
         $this->lblOnlineDonation->Text = $this->objCreditCardPayment->OnlineDonation ? $this->objCreditCardPayment->OnlineDonation->__toString() : null;
     }
     if ($this->lstSignupPayment) {
         $this->lstSignupPayment->RemoveAllItems();
         $this->lstSignupPayment->AddItem(QApplication::Translate('- Select One -'), null);
         $objSignupPaymentArray = SignupPayment::LoadAll();
         if ($objSignupPaymentArray) {
             foreach ($objSignupPaymentArray as $objSignupPayment) {
                 $objListItem = new QListItem($objSignupPayment->__toString(), $objSignupPayment->Id);
                 if ($objSignupPayment->CreditCardPaymentId == $this->objCreditCardPayment->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSignupPayment->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSignupPayment) {
         $this->lblSignupPayment->Text = $this->objCreditCardPayment->SignupPayment ? $this->objCreditCardPayment->SignupPayment->__toString() : null;
     }
 }