/**
  * Refresh this MetaControl with Data from the local StewardshipBatch object.
  * @param boolean $blnReload reload StewardshipBatch from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objStewardshipBatch->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objStewardshipBatch->Id;
         }
     }
     if ($this->lstStewardshipBatchStatusType) {
         $this->lstStewardshipBatchStatusType->SelectedValue = $this->objStewardshipBatch->StewardshipBatchStatusTypeId;
     }
     if ($this->lblStewardshipBatchStatusTypeId) {
         $this->lblStewardshipBatchStatusTypeId->Text = $this->objStewardshipBatch->StewardshipBatchStatusTypeId ? StewardshipBatchStatusType::$NameArray[$this->objStewardshipBatch->StewardshipBatchStatusTypeId] : null;
     }
     if ($this->calDateEntered) {
         $this->calDateEntered->DateTime = $this->objStewardshipBatch->DateEntered;
     }
     if ($this->lblDateEntered) {
         $this->lblDateEntered->Text = sprintf($this->objStewardshipBatch->DateEntered) ? $this->objStewardshipBatch->__toString($this->strDateEnteredDateTimeFormat) : null;
     }
     if ($this->calDateCredited) {
         $this->calDateCredited->DateTime = $this->objStewardshipBatch->DateCredited;
     }
     if ($this->lblDateCredited) {
         $this->lblDateCredited->Text = sprintf($this->objStewardshipBatch->DateCredited) ? $this->objStewardshipBatch->__toString($this->strDateCreditedDateTimeFormat) : null;
     }
     if ($this->txtBatchLabel) {
         $this->txtBatchLabel->Text = $this->objStewardshipBatch->BatchLabel;
     }
     if ($this->lblBatchLabel) {
         $this->lblBatchLabel->Text = $this->objStewardshipBatch->BatchLabel;
     }
     if ($this->txtDescription) {
         $this->txtDescription->Text = $this->objStewardshipBatch->Description;
     }
     if ($this->lblDescription) {
         $this->lblDescription->Text = $this->objStewardshipBatch->Description;
     }
     if ($this->txtItemCount) {
         $this->txtItemCount->Text = $this->objStewardshipBatch->ItemCount;
     }
     if ($this->lblItemCount) {
         $this->lblItemCount->Text = $this->objStewardshipBatch->ItemCount;
     }
     if ($this->txtReportedTotalAmount) {
         $this->txtReportedTotalAmount->Text = $this->objStewardshipBatch->ReportedTotalAmount;
     }
     if ($this->lblReportedTotalAmount) {
         $this->lblReportedTotalAmount->Text = $this->objStewardshipBatch->ReportedTotalAmount;
     }
     if ($this->txtActualTotalAmount) {
         $this->txtActualTotalAmount->Text = $this->objStewardshipBatch->ActualTotalAmount;
     }
     if ($this->lblActualTotalAmount) {
         $this->lblActualTotalAmount->Text = $this->objStewardshipBatch->ActualTotalAmount;
     }
     if ($this->txtPostedTotalAmount) {
         $this->txtPostedTotalAmount->Text = $this->objStewardshipBatch->PostedTotalAmount;
     }
     if ($this->lblPostedTotalAmount) {
         $this->lblPostedTotalAmount->Text = $this->objStewardshipBatch->PostedTotalAmount;
     }
     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->objStewardshipBatch->CreatedByLogin && $this->objStewardshipBatch->CreatedByLogin->Id == $objCreatedByLogin->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreatedByLogin->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreatedByLoginId) {
         $this->lblCreatedByLoginId->Text = $this->objStewardshipBatch->CreatedByLogin ? $this->objStewardshipBatch->CreatedByLogin->__toString() : null;
     }
     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 ($objPaypalBatch->StewardshipBatchId == $this->objStewardshipBatch->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPaypalBatch->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPaypalBatch) {
         $this->lblPaypalBatch->Text = $this->objStewardshipBatch->PaypalBatch ? $this->objStewardshipBatch->PaypalBatch->__toString() : null;
     }
 }
 /**
  * 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;
     }
 }