/**
  * Refresh this MetaControl with Data from the local StewardshipPostLineItem object.
  * @param boolean $blnReload reload StewardshipPostLineItem from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objStewardshipPostLineItem->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objStewardshipPostLineItem->Id;
         }
     }
     if ($this->lstStewardshipPost) {
         $this->lstStewardshipPost->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstStewardshipPost->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objStewardshipPostArray = StewardshipPost::LoadAll();
         if ($objStewardshipPostArray) {
             foreach ($objStewardshipPostArray as $objStewardshipPost) {
                 $objListItem = new QListItem($objStewardshipPost->__toString(), $objStewardshipPost->Id);
                 if ($this->objStewardshipPostLineItem->StewardshipPost && $this->objStewardshipPostLineItem->StewardshipPost->Id == $objStewardshipPost->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstStewardshipPost->AddItem($objListItem);
             }
         }
     }
     if ($this->lblStewardshipPostId) {
         $this->lblStewardshipPostId->Text = $this->objStewardshipPostLineItem->StewardshipPost ? $this->objStewardshipPostLineItem->StewardshipPost->__toString() : null;
     }
     if ($this->lstStewardshipContribution) {
         $this->lstStewardshipContribution->RemoveAllItems();
         if (!$this->blnEditMode) {
             $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->objStewardshipPostLineItem->StewardshipContribution && $this->objStewardshipPostLineItem->StewardshipContribution->Id == $objStewardshipContribution->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstStewardshipContribution->AddItem($objListItem);
             }
         }
     }
     if ($this->lblStewardshipContributionId) {
         $this->lblStewardshipContributionId->Text = $this->objStewardshipPostLineItem->StewardshipContribution ? $this->objStewardshipPostLineItem->StewardshipContribution->__toString() : null;
     }
     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->objStewardshipPostLineItem->Person && $this->objStewardshipPostLineItem->Person->Id == $objPerson->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPerson->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPersonId) {
         $this->lblPersonId->Text = $this->objStewardshipPostLineItem->Person ? $this->objStewardshipPostLineItem->Person->__toString() : null;
     }
     if ($this->lstStewardshipFund) {
         $this->lstStewardshipFund->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstStewardshipFund->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objStewardshipFundArray = StewardshipFund::LoadAll();
         if ($objStewardshipFundArray) {
             foreach ($objStewardshipFundArray as $objStewardshipFund) {
                 $objListItem = new QListItem($objStewardshipFund->__toString(), $objStewardshipFund->Id);
                 if ($this->objStewardshipPostLineItem->StewardshipFund && $this->objStewardshipPostLineItem->StewardshipFund->Id == $objStewardshipFund->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstStewardshipFund->AddItem($objListItem);
             }
         }
     }
     if ($this->lblStewardshipFundId) {
         $this->lblStewardshipFundId->Text = $this->objStewardshipPostLineItem->StewardshipFund ? $this->objStewardshipPostLineItem->StewardshipFund->__toString() : null;
     }
     if ($this->txtDescription) {
         $this->txtDescription->Text = $this->objStewardshipPostLineItem->Description;
     }
     if ($this->lblDescription) {
         $this->lblDescription->Text = $this->objStewardshipPostLineItem->Description;
     }
     if ($this->txtAmount) {
         $this->txtAmount->Text = $this->objStewardshipPostLineItem->Amount;
     }
     if ($this->lblAmount) {
         $this->lblAmount->Text = $this->objStewardshipPostLineItem->Amount;
     }
 }
 /**
  * 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;
     }
 }