/**
  * Refresh this MetaControl with Data from the local FormProduct object.
  * @param boolean $blnReload reload FormProduct from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objFormProduct->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objFormProduct->Id;
         }
     }
     if ($this->lstSignupForm) {
         $this->lstSignupForm->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstSignupForm->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objSignupFormArray = SignupForm::LoadAll();
         if ($objSignupFormArray) {
             foreach ($objSignupFormArray as $objSignupForm) {
                 $objListItem = new QListItem($objSignupForm->__toString(), $objSignupForm->Id);
                 if ($this->objFormProduct->SignupForm && $this->objFormProduct->SignupForm->Id == $objSignupForm->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSignupForm->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSignupFormId) {
         $this->lblSignupFormId->Text = $this->objFormProduct->SignupForm ? $this->objFormProduct->SignupForm->__toString() : null;
     }
     if ($this->txtOrderNumber) {
         $this->txtOrderNumber->Text = $this->objFormProduct->OrderNumber;
     }
     if ($this->lblOrderNumber) {
         $this->lblOrderNumber->Text = $this->objFormProduct->OrderNumber;
     }
     if ($this->lstFormProductType) {
         $this->lstFormProductType->SelectedValue = $this->objFormProduct->FormProductTypeId;
     }
     if ($this->lblFormProductTypeId) {
         $this->lblFormProductTypeId->Text = $this->objFormProduct->FormProductTypeId ? FormProductType::$NameArray[$this->objFormProduct->FormProductTypeId] : null;
     }
     if ($this->lstFormPaymentType) {
         $this->lstFormPaymentType->SelectedValue = $this->objFormProduct->FormPaymentTypeId;
     }
     if ($this->lblFormPaymentTypeId) {
         $this->lblFormPaymentTypeId->Text = $this->objFormProduct->FormPaymentTypeId ? FormPaymentType::$NameArray[$this->objFormProduct->FormPaymentTypeId] : null;
     }
     if ($this->txtName) {
         $this->txtName->Text = $this->objFormProduct->Name;
     }
     if ($this->lblName) {
         $this->lblName->Text = $this->objFormProduct->Name;
     }
     if ($this->txtDescription) {
         $this->txtDescription->Text = $this->objFormProduct->Description;
     }
     if ($this->lblDescription) {
         $this->lblDescription->Text = $this->objFormProduct->Description;
     }
     if ($this->calDateStart) {
         $this->calDateStart->DateTime = $this->objFormProduct->DateStart;
     }
     if ($this->lblDateStart) {
         $this->lblDateStart->Text = sprintf($this->objFormProduct->DateStart) ? $this->objFormProduct->__toString($this->strDateStartDateTimeFormat) : null;
     }
     if ($this->calDateEnd) {
         $this->calDateEnd->DateTime = $this->objFormProduct->DateEnd;
     }
     if ($this->lblDateEnd) {
         $this->lblDateEnd->Text = sprintf($this->objFormProduct->DateEnd) ? $this->objFormProduct->__toString($this->strDateEndDateTimeFormat) : null;
     }
     if ($this->txtMinimumQuantity) {
         $this->txtMinimumQuantity->Text = $this->objFormProduct->MinimumQuantity;
     }
     if ($this->lblMinimumQuantity) {
         $this->lblMinimumQuantity->Text = $this->objFormProduct->MinimumQuantity;
     }
     if ($this->txtMaximumQuantity) {
         $this->txtMaximumQuantity->Text = $this->objFormProduct->MaximumQuantity;
     }
     if ($this->lblMaximumQuantity) {
         $this->lblMaximumQuantity->Text = $this->objFormProduct->MaximumQuantity;
     }
     if ($this->txtCost) {
         $this->txtCost->Text = $this->objFormProduct->Cost;
     }
     if ($this->lblCost) {
         $this->lblCost->Text = $this->objFormProduct->Cost;
     }
     if ($this->txtDeposit) {
         $this->txtDeposit->Text = $this->objFormProduct->Deposit;
     }
     if ($this->lblDeposit) {
         $this->lblDeposit->Text = $this->objFormProduct->Deposit;
     }
     if ($this->chkViewFlag) {
         $this->chkViewFlag->Checked = $this->objFormProduct->ViewFlag;
     }
     if ($this->lblViewFlag) {
         $this->lblViewFlag->Text = $this->objFormProduct->ViewFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
 }
 /**
  * Refresh this MetaControl with Data from the local FormQuestion object.
  * @param boolean $blnReload reload FormQuestion from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objFormQuestion->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objFormQuestion->Id;
         }
     }
     if ($this->lstSignupForm) {
         $this->lstSignupForm->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstSignupForm->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objSignupFormArray = SignupForm::LoadAll();
         if ($objSignupFormArray) {
             foreach ($objSignupFormArray as $objSignupForm) {
                 $objListItem = new QListItem($objSignupForm->__toString(), $objSignupForm->Id);
                 if ($this->objFormQuestion->SignupForm && $this->objFormQuestion->SignupForm->Id == $objSignupForm->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSignupForm->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSignupFormId) {
         $this->lblSignupFormId->Text = $this->objFormQuestion->SignupForm ? $this->objFormQuestion->SignupForm->__toString() : null;
     }
     if ($this->txtOrderNumber) {
         $this->txtOrderNumber->Text = $this->objFormQuestion->OrderNumber;
     }
     if ($this->lblOrderNumber) {
         $this->lblOrderNumber->Text = $this->objFormQuestion->OrderNumber;
     }
     if ($this->lstFormQuestionType) {
         $this->lstFormQuestionType->SelectedValue = $this->objFormQuestion->FormQuestionTypeId;
     }
     if ($this->lblFormQuestionTypeId) {
         $this->lblFormQuestionTypeId->Text = $this->objFormQuestion->FormQuestionTypeId ? FormQuestionType::$NameArray[$this->objFormQuestion->FormQuestionTypeId] : null;
     }
     if ($this->txtShortDescription) {
         $this->txtShortDescription->Text = $this->objFormQuestion->ShortDescription;
     }
     if ($this->lblShortDescription) {
         $this->lblShortDescription->Text = $this->objFormQuestion->ShortDescription;
     }
     if ($this->txtQuestion) {
         $this->txtQuestion->Text = $this->objFormQuestion->Question;
     }
     if ($this->lblQuestion) {
         $this->lblQuestion->Text = $this->objFormQuestion->Question;
     }
     if ($this->chkRequiredFlag) {
         $this->chkRequiredFlag->Checked = $this->objFormQuestion->RequiredFlag;
     }
     if ($this->lblRequiredFlag) {
         $this->lblRequiredFlag->Text = $this->objFormQuestion->RequiredFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkInternalFlag) {
         $this->chkInternalFlag->Checked = $this->objFormQuestion->InternalFlag;
     }
     if ($this->lblInternalFlag) {
         $this->lblInternalFlag->Text = $this->objFormQuestion->InternalFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->txtOptions) {
         $this->txtOptions->Text = $this->objFormQuestion->Options;
     }
     if ($this->lblOptions) {
         $this->lblOptions->Text = $this->objFormQuestion->Options;
     }
     if ($this->chkAllowOtherFlag) {
         $this->chkAllowOtherFlag->Checked = $this->objFormQuestion->AllowOtherFlag;
     }
     if ($this->lblAllowOtherFlag) {
         $this->lblAllowOtherFlag->Text = $this->objFormQuestion->AllowOtherFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkViewFlag) {
         $this->chkViewFlag->Checked = $this->objFormQuestion->ViewFlag;
     }
     if ($this->lblViewFlag) {
         $this->lblViewFlag->Text = $this->objFormQuestion->ViewFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
 }
 /**
  * Refresh this MetaControl with Data from the local SignupEntry object.
  * @param boolean $blnReload reload SignupEntry from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objSignupEntry->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objSignupEntry->Id;
         }
     }
     if ($this->lstSignupForm) {
         $this->lstSignupForm->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstSignupForm->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objSignupFormArray = SignupForm::LoadAll();
         if ($objSignupFormArray) {
             foreach ($objSignupFormArray as $objSignupForm) {
                 $objListItem = new QListItem($objSignupForm->__toString(), $objSignupForm->Id);
                 if ($this->objSignupEntry->SignupForm && $this->objSignupEntry->SignupForm->Id == $objSignupForm->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSignupForm->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSignupFormId) {
         $this->lblSignupFormId->Text = $this->objSignupEntry->SignupForm ? $this->objSignupEntry->SignupForm->__toString() : null;
     }
     if ($this->lstPerson) {
         $this->lstPerson->RemoveAllItems();
         $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->objSignupEntry->Person && $this->objSignupEntry->Person->Id == $objPerson->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPerson->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPersonId) {
         $this->lblPersonId->Text = $this->objSignupEntry->Person ? $this->objSignupEntry->Person->__toString() : null;
     }
     if ($this->lstSignupByPerson) {
         $this->lstSignupByPerson->RemoveAllItems();
         $this->lstSignupByPerson->AddItem(QApplication::Translate('- Select One -'), null);
         $objSignupByPersonArray = Person::LoadAll();
         if ($objSignupByPersonArray) {
             foreach ($objSignupByPersonArray as $objSignupByPerson) {
                 $objListItem = new QListItem($objSignupByPerson->__toString(), $objSignupByPerson->Id);
                 if ($this->objSignupEntry->SignupByPerson && $this->objSignupEntry->SignupByPerson->Id == $objSignupByPerson->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSignupByPerson->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSignupByPersonId) {
         $this->lblSignupByPersonId->Text = $this->objSignupEntry->SignupByPerson ? $this->objSignupEntry->SignupByPerson->__toString() : null;
     }
     if ($this->lstSignupEntryStatusType) {
         $this->lstSignupEntryStatusType->SelectedValue = $this->objSignupEntry->SignupEntryStatusTypeId;
     }
     if ($this->lblSignupEntryStatusTypeId) {
         $this->lblSignupEntryStatusTypeId->Text = $this->objSignupEntry->SignupEntryStatusTypeId ? SignupEntryStatusType::$NameArray[$this->objSignupEntry->SignupEntryStatusTypeId] : null;
     }
     if ($this->calDateCreated) {
         $this->calDateCreated->DateTime = $this->objSignupEntry->DateCreated;
     }
     if ($this->lblDateCreated) {
         $this->lblDateCreated->Text = sprintf($this->objSignupEntry->DateCreated) ? $this->objSignupEntry->__toString($this->strDateCreatedDateTimeFormat) : null;
     }
     if ($this->calDateSubmitted) {
         $this->calDateSubmitted->DateTime = $this->objSignupEntry->DateSubmitted;
     }
     if ($this->lblDateSubmitted) {
         $this->lblDateSubmitted->Text = sprintf($this->objSignupEntry->DateSubmitted) ? $this->objSignupEntry->__toString($this->strDateSubmittedDateTimeFormat) : null;
     }
     if ($this->txtAmountTotal) {
         $this->txtAmountTotal->Text = $this->objSignupEntry->AmountTotal;
     }
     if ($this->lblAmountTotal) {
         $this->lblAmountTotal->Text = $this->objSignupEntry->AmountTotal;
     }
     if ($this->txtAmountPaid) {
         $this->txtAmountPaid->Text = $this->objSignupEntry->AmountPaid;
     }
     if ($this->lblAmountPaid) {
         $this->lblAmountPaid->Text = $this->objSignupEntry->AmountPaid;
     }
     if ($this->txtAmountBalance) {
         $this->txtAmountBalance->Text = $this->objSignupEntry->AmountBalance;
     }
     if ($this->lblAmountBalance) {
         $this->lblAmountBalance->Text = $this->objSignupEntry->AmountBalance;
     }
     if ($this->txtInternalNotes) {
         $this->txtInternalNotes->Text = $this->objSignupEntry->InternalNotes;
     }
     if ($this->lblInternalNotes) {
         $this->lblInternalNotes->Text = $this->objSignupEntry->InternalNotes;
     }
     if ($this->lstCommunicationsEntry) {
         $this->lstCommunicationsEntry->RemoveAllItems();
         $this->lstCommunicationsEntry->AddItem(QApplication::Translate('- Select One -'), null);
         $objCommunicationsEntryArray = CommunicationListEntry::LoadAll();
         if ($objCommunicationsEntryArray) {
             foreach ($objCommunicationsEntryArray as $objCommunicationsEntry) {
                 $objListItem = new QListItem($objCommunicationsEntry->__toString(), $objCommunicationsEntry->Id);
                 if ($this->objSignupEntry->CommunicationsEntry && $this->objSignupEntry->CommunicationsEntry->Id == $objCommunicationsEntry->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCommunicationsEntry->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCommunicationsEntryId) {
         $this->lblCommunicationsEntryId->Text = $this->objSignupEntry->CommunicationsEntry ? $this->objSignupEntry->CommunicationsEntry->__toString() : null;
     }
     if ($this->lstClassRegistration) {
         $this->lstClassRegistration->RemoveAllItems();
         $this->lstClassRegistration->AddItem(QApplication::Translate('- Select One -'), null);
         $objClassRegistrationArray = ClassRegistration::LoadAll();
         if ($objClassRegistrationArray) {
             foreach ($objClassRegistrationArray as $objClassRegistration) {
                 $objListItem = new QListItem($objClassRegistration->__toString(), $objClassRegistration->SignupEntryId);
                 if ($objClassRegistration->SignupEntryId == $this->objSignupEntry->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstClassRegistration->AddItem($objListItem);
             }
         }
         // Because ClassRegistration's ClassRegistration is not null, if a value is already selected, it cannot be changed.
         if ($this->lstClassRegistration->SelectedValue) {
             $this->lstClassRegistration->Enabled = false;
         } else {
             $this->lstClassRegistration->Enabled = true;
         }
     }
     if ($this->lblClassRegistration) {
         $this->lblClassRegistration->Text = $this->objSignupEntry->ClassRegistration ? $this->objSignupEntry->ClassRegistration->__toString() : null;
     }
 }
 /**
  * Refresh this MetaControl with Data from the local EventSignupForm object.
  * @param boolean $blnReload reload EventSignupForm from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objEventSignupForm->Reload();
     }
     if ($this->lstSignupForm) {
         $this->lstSignupForm->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstSignupForm->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objSignupFormArray = SignupForm::LoadAll();
         if ($objSignupFormArray) {
             foreach ($objSignupFormArray as $objSignupForm) {
                 $objListItem = new QListItem($objSignupForm->__toString(), $objSignupForm->Id);
                 if ($this->objEventSignupForm->SignupForm && $this->objEventSignupForm->SignupForm->Id == $objSignupForm->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSignupForm->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSignupFormId) {
         $this->lblSignupFormId->Text = $this->objEventSignupForm->SignupForm ? $this->objEventSignupForm->SignupForm->__toString() : null;
     }
     if ($this->calDateStart) {
         $this->calDateStart->DateTime = $this->objEventSignupForm->DateStart;
     }
     if ($this->lblDateStart) {
         $this->lblDateStart->Text = sprintf($this->objEventSignupForm->DateStart) ? $this->objEventSignupForm->__toString($this->strDateStartDateTimeFormat) : null;
     }
     if ($this->calDateEnd) {
         $this->calDateEnd->DateTime = $this->objEventSignupForm->DateEnd;
     }
     if ($this->lblDateEnd) {
         $this->lblDateEnd->Text = sprintf($this->objEventSignupForm->DateEnd) ? $this->objEventSignupForm->__toString($this->strDateEndDateTimeFormat) : null;
     }
     if ($this->txtLocation) {
         $this->txtLocation->Text = $this->objEventSignupForm->Location;
     }
     if ($this->lblLocation) {
         $this->lblLocation->Text = $this->objEventSignupForm->Location;
     }
 }
 /**
  * Refresh this MetaControl with Data from the local ClassMeeting object.
  * @param boolean $blnReload reload ClassMeeting from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objClassMeeting->Reload();
     }
     if ($this->lstSignupForm) {
         $this->lstSignupForm->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstSignupForm->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objSignupFormArray = SignupForm::LoadAll();
         if ($objSignupFormArray) {
             foreach ($objSignupFormArray as $objSignupForm) {
                 $objListItem = new QListItem($objSignupForm->__toString(), $objSignupForm->Id);
                 if ($this->objClassMeeting->SignupForm && $this->objClassMeeting->SignupForm->Id == $objSignupForm->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSignupForm->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSignupFormId) {
         $this->lblSignupFormId->Text = $this->objClassMeeting->SignupForm ? $this->objClassMeeting->SignupForm->__toString() : null;
     }
     if ($this->lstClassTerm) {
         $this->lstClassTerm->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstClassTerm->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objClassTermArray = ClassTerm::LoadAll();
         if ($objClassTermArray) {
             foreach ($objClassTermArray as $objClassTerm) {
                 $objListItem = new QListItem($objClassTerm->__toString(), $objClassTerm->Id);
                 if ($this->objClassMeeting->ClassTerm && $this->objClassMeeting->ClassTerm->Id == $objClassTerm->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstClassTerm->AddItem($objListItem);
             }
         }
     }
     if ($this->lblClassTermId) {
         $this->lblClassTermId->Text = $this->objClassMeeting->ClassTerm ? $this->objClassMeeting->ClassTerm->__toString() : null;
     }
     if ($this->lstClassCourse) {
         $this->lstClassCourse->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstClassCourse->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objClassCourseArray = ClassCourse::LoadAll();
         if ($objClassCourseArray) {
             foreach ($objClassCourseArray as $objClassCourse) {
                 $objListItem = new QListItem($objClassCourse->__toString(), $objClassCourse->Id);
                 if ($this->objClassMeeting->ClassCourse && $this->objClassMeeting->ClassCourse->Id == $objClassCourse->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstClassCourse->AddItem($objListItem);
             }
         }
     }
     if ($this->lblClassCourseId) {
         $this->lblClassCourseId->Text = $this->objClassMeeting->ClassCourse ? $this->objClassMeeting->ClassCourse->__toString() : null;
     }
     if ($this->lstClassInstructor) {
         $this->lstClassInstructor->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstClassInstructor->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objClassInstructorArray = ClassInstructor::LoadAll();
         if ($objClassInstructorArray) {
             foreach ($objClassInstructorArray as $objClassInstructor) {
                 $objListItem = new QListItem($objClassInstructor->__toString(), $objClassInstructor->Id);
                 if ($this->objClassMeeting->ClassInstructor && $this->objClassMeeting->ClassInstructor->Id == $objClassInstructor->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstClassInstructor->AddItem($objListItem);
             }
         }
     }
     if ($this->lblClassInstructorId) {
         $this->lblClassInstructorId->Text = $this->objClassMeeting->ClassInstructor ? $this->objClassMeeting->ClassInstructor->__toString() : null;
     }
     if ($this->calDateStart) {
         $this->calDateStart->DateTime = $this->objClassMeeting->DateStart;
     }
     if ($this->lblDateStart) {
         $this->lblDateStart->Text = sprintf($this->objClassMeeting->DateStart) ? $this->objClassMeeting->__toString($this->strDateStartDateTimeFormat) : null;
     }
     if ($this->calDateEnd) {
         $this->calDateEnd->DateTime = $this->objClassMeeting->DateEnd;
     }
     if ($this->lblDateEnd) {
         $this->lblDateEnd->Text = sprintf($this->objClassMeeting->DateEnd) ? $this->objClassMeeting->__toString($this->strDateEndDateTimeFormat) : null;
     }
     if ($this->txtLocation) {
         $this->txtLocation->Text = $this->objClassMeeting->Location;
     }
     if ($this->lblLocation) {
         $this->lblLocation->Text = $this->objClassMeeting->Location;
     }
     if ($this->txtMeetingDay) {
         $this->txtMeetingDay->Text = $this->objClassMeeting->MeetingDay;
     }
     if ($this->lblMeetingDay) {
         $this->lblMeetingDay->Text = $this->objClassMeeting->MeetingDay;
     }
     if ($this->txtMeetingStartTime) {
         $this->txtMeetingStartTime->Text = $this->objClassMeeting->MeetingStartTime;
     }
     if ($this->lblMeetingStartTime) {
         $this->lblMeetingStartTime->Text = $this->objClassMeeting->MeetingStartTime;
     }
     if ($this->txtMeetingEndTime) {
         $this->txtMeetingEndTime->Text = $this->objClassMeeting->MeetingEndTime;
     }
     if ($this->lblMeetingEndTime) {
         $this->lblMeetingEndTime->Text = $this->objClassMeeting->MeetingEndTime;
     }
 }