/**
  * Refresh this MetaControl with Data from the local SignupProduct object.
  * @param boolean $blnReload reload SignupProduct from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objSignupProduct->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objSignupProduct->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->objSignupProduct->SignupEntry && $this->objSignupProduct->SignupEntry->Id == $objSignupEntry->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSignupEntry->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSignupEntryId) {
         $this->lblSignupEntryId->Text = $this->objSignupProduct->SignupEntry ? $this->objSignupProduct->SignupEntry->__toString() : null;
     }
     if ($this->lstFormProduct) {
         $this->lstFormProduct->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstFormProduct->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objFormProductArray = FormProduct::LoadAll();
         if ($objFormProductArray) {
             foreach ($objFormProductArray as $objFormProduct) {
                 $objListItem = new QListItem($objFormProduct->__toString(), $objFormProduct->Id);
                 if ($this->objSignupProduct->FormProduct && $this->objSignupProduct->FormProduct->Id == $objFormProduct->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstFormProduct->AddItem($objListItem);
             }
         }
     }
     if ($this->lblFormProductId) {
         $this->lblFormProductId->Text = $this->objSignupProduct->FormProduct ? $this->objSignupProduct->FormProduct->__toString() : null;
     }
     if ($this->txtQuantity) {
         $this->txtQuantity->Text = $this->objSignupProduct->Quantity;
     }
     if ($this->lblQuantity) {
         $this->lblQuantity->Text = $this->objSignupProduct->Quantity;
     }
     if ($this->txtAmount) {
         $this->txtAmount->Text = $this->objSignupProduct->Amount;
     }
     if ($this->lblAmount) {
         $this->lblAmount->Text = $this->objSignupProduct->Amount;
     }
     if ($this->txtDeposit) {
         $this->txtDeposit->Text = $this->objSignupProduct->Deposit;
     }
     if ($this->lblDeposit) {
         $this->lblDeposit->Text = $this->objSignupProduct->Deposit;
     }
 }
 /**
  * Refresh this MetaControl with Data from the local ClassRegistration object.
  * @param boolean $blnReload reload ClassRegistration from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objClassRegistration->Reload();
     }
     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->objClassRegistration->SignupEntry && $this->objClassRegistration->SignupEntry->Id == $objSignupEntry->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSignupEntry->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSignupEntryId) {
         $this->lblSignupEntryId->Text = $this->objClassRegistration->SignupEntry ? $this->objClassRegistration->SignupEntry->__toString() : null;
     }
     if ($this->lstClassMeeting) {
         $this->lstClassMeeting->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstClassMeeting->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objClassMeetingArray = ClassMeeting::LoadAll();
         if ($objClassMeetingArray) {
             foreach ($objClassMeetingArray as $objClassMeeting) {
                 $objListItem = new QListItem($objClassMeeting->__toString(), $objClassMeeting->SignupFormId);
                 if ($this->objClassRegistration->ClassMeeting && $this->objClassRegistration->ClassMeeting->SignupFormId == $objClassMeeting->SignupFormId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstClassMeeting->AddItem($objListItem);
             }
         }
     }
     if ($this->lblClassMeetingId) {
         $this->lblClassMeetingId->Text = $this->objClassRegistration->ClassMeeting ? $this->objClassRegistration->ClassMeeting->__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->objClassRegistration->Person && $this->objClassRegistration->Person->Id == $objPerson->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPerson->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPersonId) {
         $this->lblPersonId->Text = $this->objClassRegistration->Person ? $this->objClassRegistration->Person->__toString() : null;
     }
     if ($this->lstClassGrade) {
         $this->lstClassGrade->RemoveAllItems();
         $this->lstClassGrade->AddItem(QApplication::Translate('- Select One -'), null);
         $objClassGradeArray = ClassGrade::LoadAll();
         if ($objClassGradeArray) {
             foreach ($objClassGradeArray as $objClassGrade) {
                 $objListItem = new QListItem($objClassGrade->__toString(), $objClassGrade->Id);
                 if ($this->objClassRegistration->ClassGrade && $this->objClassRegistration->ClassGrade->Id == $objClassGrade->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstClassGrade->AddItem($objListItem);
             }
         }
     }
     if ($this->lblClassGradeId) {
         $this->lblClassGradeId->Text = $this->objClassRegistration->ClassGrade ? $this->objClassRegistration->ClassGrade->__toString() : null;
     }
     if ($this->txtChildcareNotes) {
         $this->txtChildcareNotes->Text = $this->objClassRegistration->ChildcareNotes;
     }
     if ($this->lblChildcareNotes) {
         $this->lblChildcareNotes->Text = $this->objClassRegistration->ChildcareNotes;
     }
 }
 /**
  * Refresh this MetaControl with Data from the local FormAnswer object.
  * @param boolean $blnReload reload FormAnswer from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objFormAnswer->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objFormAnswer->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->objFormAnswer->SignupEntry && $this->objFormAnswer->SignupEntry->Id == $objSignupEntry->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSignupEntry->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSignupEntryId) {
         $this->lblSignupEntryId->Text = $this->objFormAnswer->SignupEntry ? $this->objFormAnswer->SignupEntry->__toString() : null;
     }
     if ($this->lstFormQuestion) {
         $this->lstFormQuestion->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstFormQuestion->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objFormQuestionArray = FormQuestion::LoadAll();
         if ($objFormQuestionArray) {
             foreach ($objFormQuestionArray as $objFormQuestion) {
                 $objListItem = new QListItem($objFormQuestion->__toString(), $objFormQuestion->Id);
                 if ($this->objFormAnswer->FormQuestion && $this->objFormAnswer->FormQuestion->Id == $objFormQuestion->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstFormQuestion->AddItem($objListItem);
             }
         }
     }
     if ($this->lblFormQuestionId) {
         $this->lblFormQuestionId->Text = $this->objFormAnswer->FormQuestion ? $this->objFormAnswer->FormQuestion->__toString() : null;
     }
     if ($this->txtTextValue) {
         $this->txtTextValue->Text = $this->objFormAnswer->TextValue;
     }
     if ($this->lblTextValue) {
         $this->lblTextValue->Text = $this->objFormAnswer->TextValue;
     }
     if ($this->lstAddress) {
         $this->lstAddress->RemoveAllItems();
         $this->lstAddress->AddItem(QApplication::Translate('- Select One -'), null);
         $objAddressArray = Address::LoadAll();
         if ($objAddressArray) {
             foreach ($objAddressArray as $objAddress) {
                 $objListItem = new QListItem($objAddress->__toString(), $objAddress->Id);
                 if ($this->objFormAnswer->Address && $this->objFormAnswer->Address->Id == $objAddress->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstAddress->AddItem($objListItem);
             }
         }
     }
     if ($this->lblAddressId) {
         $this->lblAddressId->Text = $this->objFormAnswer->Address ? $this->objFormAnswer->Address->__toString() : null;
     }
     if ($this->lstPhone) {
         $this->lstPhone->RemoveAllItems();
         $this->lstPhone->AddItem(QApplication::Translate('- Select One -'), null);
         $objPhoneArray = Phone::LoadAll();
         if ($objPhoneArray) {
             foreach ($objPhoneArray as $objPhone) {
                 $objListItem = new QListItem($objPhone->__toString(), $objPhone->Id);
                 if ($this->objFormAnswer->Phone && $this->objFormAnswer->Phone->Id == $objPhone->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPhone->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPhoneId) {
         $this->lblPhoneId->Text = $this->objFormAnswer->Phone ? $this->objFormAnswer->Phone->__toString() : null;
     }
     if ($this->lstEmail) {
         $this->lstEmail->RemoveAllItems();
         $this->lstEmail->AddItem(QApplication::Translate('- Select One -'), null);
         $objEmailArray = Email::LoadAll();
         if ($objEmailArray) {
             foreach ($objEmailArray as $objEmail) {
                 $objListItem = new QListItem($objEmail->__toString(), $objEmail->Id);
                 if ($this->objFormAnswer->Email && $this->objFormAnswer->Email->Id == $objEmail->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstEmail->AddItem($objListItem);
             }
         }
     }
     if ($this->lblEmailId) {
         $this->lblEmailId->Text = $this->objFormAnswer->Email ? $this->objFormAnswer->Email->__toString() : null;
     }
     if ($this->txtIntegerValue) {
         $this->txtIntegerValue->Text = $this->objFormAnswer->IntegerValue;
     }
     if ($this->lblIntegerValue) {
         $this->lblIntegerValue->Text = $this->objFormAnswer->IntegerValue;
     }
     if ($this->chkBooleanValue) {
         $this->chkBooleanValue->Checked = $this->objFormAnswer->BooleanValue;
     }
     if ($this->lblBooleanValue) {
         $this->lblBooleanValue->Text = $this->objFormAnswer->BooleanValue ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->calDateValue) {
         $this->calDateValue->DateTime = $this->objFormAnswer->DateValue;
     }
     if ($this->lblDateValue) {
         $this->lblDateValue->Text = sprintf($this->objFormAnswer->DateValue) ? $this->objFormAnswer->__toString($this->strDateValueDateTimeFormat) : null;
     }
 }
 /**
  * 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;
     }
 }