/** * 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 Address object. * @param boolean $blnReload reload Address from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objAddress->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objAddress->Id; } } if ($this->lstAddressType) { $this->lstAddressType->SelectedValue = $this->objAddress->AddressTypeId; } if ($this->lblAddressTypeId) { $this->lblAddressTypeId->Text = $this->objAddress->AddressTypeId ? AddressType::$NameArray[$this->objAddress->AddressTypeId] : 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->objAddress->Person && $this->objAddress->Person->Id == $objPerson->Id) { $objListItem->Selected = true; } $this->lstPerson->AddItem($objListItem); } } } if ($this->lblPersonId) { $this->lblPersonId->Text = $this->objAddress->Person ? $this->objAddress->Person->__toString() : null; } if ($this->lstHousehold) { $this->lstHousehold->RemoveAllItems(); $this->lstHousehold->AddItem(QApplication::Translate('- Select One -'), null); $objHouseholdArray = Household::LoadAll(); if ($objHouseholdArray) { foreach ($objHouseholdArray as $objHousehold) { $objListItem = new QListItem($objHousehold->__toString(), $objHousehold->Id); if ($this->objAddress->Household && $this->objAddress->Household->Id == $objHousehold->Id) { $objListItem->Selected = true; } $this->lstHousehold->AddItem($objListItem); } } } if ($this->lblHouseholdId) { $this->lblHouseholdId->Text = $this->objAddress->Household ? $this->objAddress->Household->__toString() : null; } if ($this->lstPrimaryPhone) { $this->lstPrimaryPhone->RemoveAllItems(); $this->lstPrimaryPhone->AddItem(QApplication::Translate('- Select One -'), null); $objPrimaryPhoneArray = Phone::LoadAll(); if ($objPrimaryPhoneArray) { foreach ($objPrimaryPhoneArray as $objPrimaryPhone) { $objListItem = new QListItem($objPrimaryPhone->__toString(), $objPrimaryPhone->Id); if ($this->objAddress->PrimaryPhone && $this->objAddress->PrimaryPhone->Id == $objPrimaryPhone->Id) { $objListItem->Selected = true; } $this->lstPrimaryPhone->AddItem($objListItem); } } } if ($this->lblPrimaryPhoneId) { $this->lblPrimaryPhoneId->Text = $this->objAddress->PrimaryPhone ? $this->objAddress->PrimaryPhone->__toString() : null; } if ($this->txtAddress1) { $this->txtAddress1->Text = $this->objAddress->Address1; } if ($this->lblAddress1) { $this->lblAddress1->Text = $this->objAddress->Address1; } if ($this->txtAddress2) { $this->txtAddress2->Text = $this->objAddress->Address2; } if ($this->lblAddress2) { $this->lblAddress2->Text = $this->objAddress->Address2; } if ($this->txtAddress3) { $this->txtAddress3->Text = $this->objAddress->Address3; } if ($this->lblAddress3) { $this->lblAddress3->Text = $this->objAddress->Address3; } if ($this->txtCity) { $this->txtCity->Text = $this->objAddress->City; } if ($this->lblCity) { $this->lblCity->Text = $this->objAddress->City; } if ($this->txtState) { $this->txtState->Text = $this->objAddress->State; } if ($this->lblState) { $this->lblState->Text = $this->objAddress->State; } if ($this->txtZipCode) { $this->txtZipCode->Text = $this->objAddress->ZipCode; } if ($this->lblZipCode) { $this->lblZipCode->Text = $this->objAddress->ZipCode; } if ($this->txtCountry) { $this->txtCountry->Text = $this->objAddress->Country; } if ($this->lblCountry) { $this->lblCountry->Text = $this->objAddress->Country; } if ($this->chkCurrentFlag) { $this->chkCurrentFlag->Checked = $this->objAddress->CurrentFlag; } if ($this->lblCurrentFlag) { $this->lblCurrentFlag->Text = $this->objAddress->CurrentFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->chkInvalidFlag) { $this->chkInvalidFlag->Checked = $this->objAddress->InvalidFlag; } if ($this->lblInvalidFlag) { $this->lblInvalidFlag->Text = $this->objAddress->InvalidFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->chkVerificationCheckedFlag) { $this->chkVerificationCheckedFlag->Checked = $this->objAddress->VerificationCheckedFlag; } if ($this->lblVerificationCheckedFlag) { $this->lblVerificationCheckedFlag->Text = $this->objAddress->VerificationCheckedFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->calDateUntilWhen) { $this->calDateUntilWhen->DateTime = $this->objAddress->DateUntilWhen; } if ($this->lblDateUntilWhen) { $this->lblDateUntilWhen->Text = sprintf($this->objAddress->DateUntilWhen) ? $this->objAddress->__toString($this->strDateUntilWhenDateTimeFormat) : null; } if ($this->chkInternationalFlag) { $this->chkInternationalFlag->Checked = $this->objAddress->InternationalFlag; } if ($this->lblInternationalFlag) { $this->lblInternationalFlag->Text = $this->objAddress->InternationalFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } }
/** * Refresh this MetaControl with Data from the local Person object. * @param boolean $blnReload reload Person from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objPerson->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objPerson->Id; } } if ($this->lstMembershipStatusType) { $this->lstMembershipStatusType->SelectedValue = $this->objPerson->MembershipStatusTypeId; } if ($this->lblMembershipStatusTypeId) { $this->lblMembershipStatusTypeId->Text = $this->objPerson->MembershipStatusTypeId ? MembershipStatusType::$NameArray[$this->objPerson->MembershipStatusTypeId] : null; } if ($this->lstMaritalStatusType) { $this->lstMaritalStatusType->SelectedValue = $this->objPerson->MaritalStatusTypeId; } if ($this->lblMaritalStatusTypeId) { $this->lblMaritalStatusTypeId->Text = $this->objPerson->MaritalStatusTypeId ? MaritalStatusType::$NameArray[$this->objPerson->MaritalStatusTypeId] : null; } if ($this->txtFirstName) { $this->txtFirstName->Text = $this->objPerson->FirstName; } if ($this->lblFirstName) { $this->lblFirstName->Text = $this->objPerson->FirstName; } if ($this->txtMiddleName) { $this->txtMiddleName->Text = $this->objPerson->MiddleName; } if ($this->lblMiddleName) { $this->lblMiddleName->Text = $this->objPerson->MiddleName; } if ($this->txtLastName) { $this->txtLastName->Text = $this->objPerson->LastName; } if ($this->lblLastName) { $this->lblLastName->Text = $this->objPerson->LastName; } if ($this->txtMailingLabel) { $this->txtMailingLabel->Text = $this->objPerson->MailingLabel; } if ($this->lblMailingLabel) { $this->lblMailingLabel->Text = $this->objPerson->MailingLabel; } if ($this->txtPriorLastNames) { $this->txtPriorLastNames->Text = $this->objPerson->PriorLastNames; } if ($this->lblPriorLastNames) { $this->lblPriorLastNames->Text = $this->objPerson->PriorLastNames; } if ($this->txtNickname) { $this->txtNickname->Text = $this->objPerson->Nickname; } if ($this->lblNickname) { $this->lblNickname->Text = $this->objPerson->Nickname; } if ($this->txtTitle) { $this->txtTitle->Text = $this->objPerson->Title; } if ($this->lblTitle) { $this->lblTitle->Text = $this->objPerson->Title; } if ($this->txtSuffix) { $this->txtSuffix->Text = $this->objPerson->Suffix; } if ($this->lblSuffix) { $this->lblSuffix->Text = $this->objPerson->Suffix; } if ($this->txtGender) { $this->txtGender->Text = $this->objPerson->Gender; } if ($this->lblGender) { $this->lblGender->Text = $this->objPerson->Gender; } if ($this->calDateOfBirth) { $this->calDateOfBirth->DateTime = $this->objPerson->DateOfBirth; } if ($this->lblDateOfBirth) { $this->lblDateOfBirth->Text = sprintf($this->objPerson->DateOfBirth) ? $this->objPerson->__toString($this->strDateOfBirthDateTimeFormat) : null; } if ($this->chkDobYearApproximateFlag) { $this->chkDobYearApproximateFlag->Checked = $this->objPerson->DobYearApproximateFlag; } if ($this->lblDobYearApproximateFlag) { $this->lblDobYearApproximateFlag->Text = $this->objPerson->DobYearApproximateFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->chkDobGuessedFlag) { $this->chkDobGuessedFlag->Checked = $this->objPerson->DobGuessedFlag; } if ($this->lblDobGuessedFlag) { $this->lblDobGuessedFlag->Text = $this->objPerson->DobGuessedFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->txtAge) { $this->txtAge->Text = $this->objPerson->Age; } if ($this->lblAge) { $this->lblAge->Text = $this->objPerson->Age; } if ($this->chkDeceasedFlag) { $this->chkDeceasedFlag->Checked = $this->objPerson->DeceasedFlag; } if ($this->lblDeceasedFlag) { $this->lblDeceasedFlag->Text = $this->objPerson->DeceasedFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->calDateDeceased) { $this->calDateDeceased->DateTime = $this->objPerson->DateDeceased; } if ($this->lblDateDeceased) { $this->lblDateDeceased->Text = sprintf($this->objPerson->DateDeceased) ? $this->objPerson->__toString($this->strDateDeceasedDateTimeFormat) : null; } if ($this->lstCurrentHeadShot) { $this->lstCurrentHeadShot->RemoveAllItems(); $this->lstCurrentHeadShot->AddItem(QApplication::Translate('- Select One -'), null); $objCurrentHeadShotArray = HeadShot::LoadAll(); if ($objCurrentHeadShotArray) { foreach ($objCurrentHeadShotArray as $objCurrentHeadShot) { $objListItem = new QListItem($objCurrentHeadShot->__toString(), $objCurrentHeadShot->Id); if ($this->objPerson->CurrentHeadShot && $this->objPerson->CurrentHeadShot->Id == $objCurrentHeadShot->Id) { $objListItem->Selected = true; } $this->lstCurrentHeadShot->AddItem($objListItem); } } } if ($this->lblCurrentHeadShotId) { $this->lblCurrentHeadShotId->Text = $this->objPerson->CurrentHeadShot ? $this->objPerson->CurrentHeadShot->__toString() : null; } if ($this->lstMailingAddress) { $this->lstMailingAddress->RemoveAllItems(); $this->lstMailingAddress->AddItem(QApplication::Translate('- Select One -'), null); $objMailingAddressArray = Address::LoadAll(); if ($objMailingAddressArray) { foreach ($objMailingAddressArray as $objMailingAddress) { $objListItem = new QListItem($objMailingAddress->__toString(), $objMailingAddress->Id); if ($this->objPerson->MailingAddress && $this->objPerson->MailingAddress->Id == $objMailingAddress->Id) { $objListItem->Selected = true; } $this->lstMailingAddress->AddItem($objListItem); } } } if ($this->lblMailingAddressId) { $this->lblMailingAddressId->Text = $this->objPerson->MailingAddress ? $this->objPerson->MailingAddress->__toString() : null; } if ($this->lstStewardshipAddress) { $this->lstStewardshipAddress->RemoveAllItems(); $this->lstStewardshipAddress->AddItem(QApplication::Translate('- Select One -'), null); $objStewardshipAddressArray = Address::LoadAll(); if ($objStewardshipAddressArray) { foreach ($objStewardshipAddressArray as $objStewardshipAddress) { $objListItem = new QListItem($objStewardshipAddress->__toString(), $objStewardshipAddress->Id); if ($this->objPerson->StewardshipAddress && $this->objPerson->StewardshipAddress->Id == $objStewardshipAddress->Id) { $objListItem->Selected = true; } $this->lstStewardshipAddress->AddItem($objListItem); } } } if ($this->lblStewardshipAddressId) { $this->lblStewardshipAddressId->Text = $this->objPerson->StewardshipAddress ? $this->objPerson->StewardshipAddress->__toString() : null; } if ($this->lstPrimaryPhone) { $this->lstPrimaryPhone->RemoveAllItems(); $this->lstPrimaryPhone->AddItem(QApplication::Translate('- Select One -'), null); $objPrimaryPhoneArray = Phone::LoadAll(); if ($objPrimaryPhoneArray) { foreach ($objPrimaryPhoneArray as $objPrimaryPhone) { $objListItem = new QListItem($objPrimaryPhone->__toString(), $objPrimaryPhone->Id); if ($this->objPerson->PrimaryPhone && $this->objPerson->PrimaryPhone->Id == $objPrimaryPhone->Id) { $objListItem->Selected = true; } $this->lstPrimaryPhone->AddItem($objListItem); } } } if ($this->lblPrimaryPhoneId) { $this->lblPrimaryPhoneId->Text = $this->objPerson->PrimaryPhone ? $this->objPerson->PrimaryPhone->__toString() : null; } if ($this->lstPrimaryEmail) { $this->lstPrimaryEmail->RemoveAllItems(); $this->lstPrimaryEmail->AddItem(QApplication::Translate('- Select One -'), null); $objPrimaryEmailArray = Email::LoadAll(); if ($objPrimaryEmailArray) { foreach ($objPrimaryEmailArray as $objPrimaryEmail) { $objListItem = new QListItem($objPrimaryEmail->__toString(), $objPrimaryEmail->Id); if ($this->objPerson->PrimaryEmail && $this->objPerson->PrimaryEmail->Id == $objPrimaryEmail->Id) { $objListItem->Selected = true; } $this->lstPrimaryEmail->AddItem($objListItem); } } } if ($this->lblPrimaryEmailId) { $this->lblPrimaryEmailId->Text = $this->objPerson->PrimaryEmail ? $this->objPerson->PrimaryEmail->__toString() : null; } if ($this->chkCanMailFlag) { $this->chkCanMailFlag->Checked = $this->objPerson->CanMailFlag; } if ($this->lblCanMailFlag) { $this->lblCanMailFlag->Text = $this->objPerson->CanMailFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->chkCanPhoneFlag) { $this->chkCanPhoneFlag->Checked = $this->objPerson->CanPhoneFlag; } if ($this->lblCanPhoneFlag) { $this->lblCanPhoneFlag->Text = $this->objPerson->CanPhoneFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->chkCanEmailFlag) { $this->chkCanEmailFlag->Checked = $this->objPerson->CanEmailFlag; } if ($this->lblCanEmailFlag) { $this->lblCanEmailFlag->Text = $this->objPerson->CanEmailFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->txtPrimaryAddressText) { $this->txtPrimaryAddressText->Text = $this->objPerson->PrimaryAddressText; } if ($this->lblPrimaryAddressText) { $this->lblPrimaryAddressText->Text = $this->objPerson->PrimaryAddressText; } if ($this->txtPrimaryCityText) { $this->txtPrimaryCityText->Text = $this->objPerson->PrimaryCityText; } if ($this->lblPrimaryCityText) { $this->lblPrimaryCityText->Text = $this->objPerson->PrimaryCityText; } if ($this->txtPrimaryStateText) { $this->txtPrimaryStateText->Text = $this->objPerson->PrimaryStateText; } if ($this->lblPrimaryStateText) { $this->lblPrimaryStateText->Text = $this->objPerson->PrimaryStateText; } if ($this->txtPrimaryZipCodeText) { $this->txtPrimaryZipCodeText->Text = $this->objPerson->PrimaryZipCodeText; } if ($this->lblPrimaryZipCodeText) { $this->lblPrimaryZipCodeText->Text = $this->objPerson->PrimaryZipCodeText; } if ($this->txtPrimaryPhoneText) { $this->txtPrimaryPhoneText->Text = $this->objPerson->PrimaryPhoneText; } if ($this->lblPrimaryPhoneText) { $this->lblPrimaryPhoneText->Text = $this->objPerson->PrimaryPhoneText; } if ($this->chkPublicCreationFlag) { $this->chkPublicCreationFlag->Checked = $this->objPerson->PublicCreationFlag; } if ($this->lblPublicCreationFlag) { $this->lblPublicCreationFlag->Text = $this->objPerson->PublicCreationFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->lstCoPrimaryObject) { $this->lstCoPrimaryObject->RemoveAllItems(); $this->lstCoPrimaryObject->AddItem(QApplication::Translate('- Select One -'), null); $objCoPrimaryObjectArray = Person::LoadAll(); if ($objCoPrimaryObjectArray) { foreach ($objCoPrimaryObjectArray as $objCoPrimaryObject) { $objListItem = new QListItem($objCoPrimaryObject->__toString(), $objCoPrimaryObject->Id); if ($this->objPerson->CoPrimaryObject && $this->objPerson->CoPrimaryObject->Id == $objCoPrimaryObject->Id) { $objListItem->Selected = true; } $this->lstCoPrimaryObject->AddItem($objListItem); } } } if ($this->lblCoPrimary) { $this->lblCoPrimary->Text = $this->objPerson->CoPrimaryObject ? $this->objPerson->CoPrimaryObject->__toString() : null; } if ($this->lstHouseholdAsHead) { $this->lstHouseholdAsHead->RemoveAllItems(); $this->lstHouseholdAsHead->AddItem(QApplication::Translate('- Select One -'), null); $objHouseholdArray = Household::LoadAll(); if ($objHouseholdArray) { foreach ($objHouseholdArray as $objHousehold) { $objListItem = new QListItem($objHousehold->__toString(), $objHousehold->Id); if ($objHousehold->HeadPersonId == $this->objPerson->Id) { $objListItem->Selected = true; } $this->lstHouseholdAsHead->AddItem($objListItem); } } // Because Household's HouseholdAsHead is not null, if a value is already selected, it cannot be changed. if ($this->lstHouseholdAsHead->SelectedValue) { $this->lstHouseholdAsHead->Enabled = false; } else { $this->lstHouseholdAsHead->Enabled = true; } } if ($this->lblHouseholdAsHead) { $this->lblHouseholdAsHead->Text = $this->objPerson->HouseholdAsHead ? $this->objPerson->HouseholdAsHead->__toString() : null; } if ($this->lstPublicLogin) { $this->lstPublicLogin->RemoveAllItems(); $this->lstPublicLogin->AddItem(QApplication::Translate('- Select One -'), null); $objPublicLoginArray = PublicLogin::LoadAll(); if ($objPublicLoginArray) { foreach ($objPublicLoginArray as $objPublicLogin) { $objListItem = new QListItem($objPublicLogin->__toString(), $objPublicLogin->Id); if ($objPublicLogin->PersonId == $this->objPerson->Id) { $objListItem->Selected = true; } $this->lstPublicLogin->AddItem($objListItem); } } } if ($this->lblPublicLogin) { $this->lblPublicLogin->Text = $this->objPerson->PublicLogin ? $this->objPerson->PublicLogin->__toString() : null; } if ($this->lstCheckingAccountLookups) { $this->lstCheckingAccountLookups->RemoveAllItems(); $objAssociatedArray = $this->objPerson->GetCheckingAccountLookupArray(); $objCheckingAccountLookupArray = CheckingAccountLookup::LoadAll(); if ($objCheckingAccountLookupArray) { foreach ($objCheckingAccountLookupArray as $objCheckingAccountLookup) { $objListItem = new QListItem($objCheckingAccountLookup->__toString(), $objCheckingAccountLookup->Id); foreach ($objAssociatedArray as $objAssociated) { if ($objAssociated->Id == $objCheckingAccountLookup->Id) { $objListItem->Selected = true; } } $this->lstCheckingAccountLookups->AddItem($objListItem); } } } if ($this->lblCheckingAccountLookups) { $objAssociatedArray = $this->objPerson->GetCheckingAccountLookupArray(); $strItems = array(); foreach ($objAssociatedArray as $objAssociated) { $strItems[] = $objAssociated->__toString(); } $this->lblCheckingAccountLookups->Text = implode($strGlue, $strItems); } if ($this->lstCommunicationLists) { $this->lstCommunicationLists->RemoveAllItems(); $objAssociatedArray = $this->objPerson->GetCommunicationListArray(); $objCommunicationListArray = CommunicationList::LoadAll(); if ($objCommunicationListArray) { foreach ($objCommunicationListArray as $objCommunicationList) { $objListItem = new QListItem($objCommunicationList->__toString(), $objCommunicationList->Id); foreach ($objAssociatedArray as $objAssociated) { if ($objAssociated->Id == $objCommunicationList->Id) { $objListItem->Selected = true; } } $this->lstCommunicationLists->AddItem($objListItem); } } } if ($this->lblCommunicationLists) { $objAssociatedArray = $this->objPerson->GetCommunicationListArray(); $strItems = array(); foreach ($objAssociatedArray as $objAssociated) { $strItems[] = $objAssociated->__toString(); } $this->lblCommunicationLists->Text = implode($strGlue, $strItems); } if ($this->lstNameItems) { $this->lstNameItems->RemoveAllItems(); $objAssociatedArray = $this->objPerson->GetNameItemArray(); $objNameItemArray = NameItem::LoadAll(); if ($objNameItemArray) { foreach ($objNameItemArray as $objNameItem) { $objListItem = new QListItem($objNameItem->__toString(), $objNameItem->Id); foreach ($objAssociatedArray as $objAssociated) { if ($objAssociated->Id == $objNameItem->Id) { $objListItem->Selected = true; } } $this->lstNameItems->AddItem($objListItem); } } } if ($this->lblNameItems) { $objAssociatedArray = $this->objPerson->GetNameItemArray(); $strItems = array(); foreach ($objAssociatedArray as $objAssociated) { $strItems[] = $objAssociated->__toString(); } $this->lblNameItems->Text = implode($strGlue, $strItems); } }