/**
  * 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;
     }
 }