/** * Refresh this MetaControl with Data from the local ParentPagerIndividual object. * @param boolean $blnReload reload ParentPagerIndividual from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objParentPagerIndividual->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objParentPagerIndividual->Id; } } if ($this->txtServerIdentifier) { $this->txtServerIdentifier->Text = $this->objParentPagerIndividual->ServerIdentifier; } if ($this->lblServerIdentifier) { $this->lblServerIdentifier->Text = $this->objParentPagerIndividual->ServerIdentifier; } 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->objParentPagerIndividual->Person && $this->objParentPagerIndividual->Person->Id == $objPerson->Id) { $objListItem->Selected = true; } $this->lstPerson->AddItem($objListItem); } } } if ($this->lblPersonId) { $this->lblPersonId->Text = $this->objParentPagerIndividual->Person ? $this->objParentPagerIndividual->Person->__toString() : null; } if ($this->chkHiddenFlag) { $this->chkHiddenFlag->Checked = $this->objParentPagerIndividual->HiddenFlag; } if ($this->lblHiddenFlag) { $this->lblHiddenFlag->Text = $this->objParentPagerIndividual->HiddenFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->lstParentPagerSyncStatusType) { $this->lstParentPagerSyncStatusType->SelectedValue = $this->objParentPagerIndividual->ParentPagerSyncStatusTypeId; } if ($this->lblParentPagerSyncStatusTypeId) { $this->lblParentPagerSyncStatusTypeId->Text = $this->objParentPagerIndividual->ParentPagerSyncStatusTypeId ? ParentPagerSyncStatusType::$NameArray[$this->objParentPagerIndividual->ParentPagerSyncStatusTypeId] : null; } if ($this->lstParentPagerHousehold) { $this->lstParentPagerHousehold->RemoveAllItems(); $this->lstParentPagerHousehold->AddItem(QApplication::Translate('- Select One -'), null); $objParentPagerHouseholdArray = ParentPagerHousehold::LoadAll(); if ($objParentPagerHouseholdArray) { foreach ($objParentPagerHouseholdArray as $objParentPagerHousehold) { $objListItem = new QListItem($objParentPagerHousehold->__toString(), $objParentPagerHousehold->Id); if ($this->objParentPagerIndividual->ParentPagerHousehold && $this->objParentPagerIndividual->ParentPagerHousehold->Id == $objParentPagerHousehold->Id) { $objListItem->Selected = true; } $this->lstParentPagerHousehold->AddItem($objListItem); } } } if ($this->lblParentPagerHouseholdId) { $this->lblParentPagerHouseholdId->Text = $this->objParentPagerIndividual->ParentPagerHousehold ? $this->objParentPagerIndividual->ParentPagerHousehold->__toString() : null; } if ($this->txtFirstName) { $this->txtFirstName->Text = $this->objParentPagerIndividual->FirstName; } if ($this->lblFirstName) { $this->lblFirstName->Text = $this->objParentPagerIndividual->FirstName; } if ($this->txtMiddleName) { $this->txtMiddleName->Text = $this->objParentPagerIndividual->MiddleName; } if ($this->lblMiddleName) { $this->lblMiddleName->Text = $this->objParentPagerIndividual->MiddleName; } if ($this->txtLastName) { $this->txtLastName->Text = $this->objParentPagerIndividual->LastName; } if ($this->lblLastName) { $this->lblLastName->Text = $this->objParentPagerIndividual->LastName; } if ($this->txtPrefix) { $this->txtPrefix->Text = $this->objParentPagerIndividual->Prefix; } if ($this->lblPrefix) { $this->lblPrefix->Text = $this->objParentPagerIndividual->Prefix; } if ($this->txtSuffix) { $this->txtSuffix->Text = $this->objParentPagerIndividual->Suffix; } if ($this->lblSuffix) { $this->lblSuffix->Text = $this->objParentPagerIndividual->Suffix; } if ($this->txtNickname) { $this->txtNickname->Text = $this->objParentPagerIndividual->Nickname; } if ($this->lblNickname) { $this->lblNickname->Text = $this->objParentPagerIndividual->Nickname; } if ($this->txtGraduationYear) { $this->txtGraduationYear->Text = $this->objParentPagerIndividual->GraduationYear; } if ($this->lblGraduationYear) { $this->lblGraduationYear->Text = $this->objParentPagerIndividual->GraduationYear; } if ($this->txtGender) { $this->txtGender->Text = $this->objParentPagerIndividual->Gender; } if ($this->lblGender) { $this->lblGender->Text = $this->objParentPagerIndividual->Gender; } if ($this->calDateOfBirth) { $this->calDateOfBirth->DateTime = $this->objParentPagerIndividual->DateOfBirth; } if ($this->lblDateOfBirth) { $this->lblDateOfBirth->Text = sprintf($this->objParentPagerIndividual->DateOfBirth) ? $this->objParentPagerIndividual->__toString($this->strDateOfBirthDateTimeFormat) : null; } }
/** * Refresh this MetaControl with Data from the local ParentPagerAddress object. * @param boolean $blnReload reload ParentPagerAddress from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objParentPagerAddress->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objParentPagerAddress->Id; } } if ($this->txtServerIdentifier) { $this->txtServerIdentifier->Text = $this->objParentPagerAddress->ServerIdentifier; } if ($this->lblServerIdentifier) { $this->lblServerIdentifier->Text = $this->objParentPagerAddress->ServerIdentifier; } if ($this->lstParentPagerIndividual) { $this->lstParentPagerIndividual->RemoveAllItems(); $this->lstParentPagerIndividual->AddItem(QApplication::Translate('- Select One -'), null); $objParentPagerIndividualArray = ParentPagerIndividual::LoadAll(); if ($objParentPagerIndividualArray) { foreach ($objParentPagerIndividualArray as $objParentPagerIndividual) { $objListItem = new QListItem($objParentPagerIndividual->__toString(), $objParentPagerIndividual->Id); if ($this->objParentPagerAddress->ParentPagerIndividual && $this->objParentPagerAddress->ParentPagerIndividual->Id == $objParentPagerIndividual->Id) { $objListItem->Selected = true; } $this->lstParentPagerIndividual->AddItem($objListItem); } } } if ($this->lblParentPagerIndividualId) { $this->lblParentPagerIndividualId->Text = $this->objParentPagerAddress->ParentPagerIndividual ? $this->objParentPagerAddress->ParentPagerIndividual->__toString() : null; } if ($this->lstParentPagerHousehold) { $this->lstParentPagerHousehold->RemoveAllItems(); $this->lstParentPagerHousehold->AddItem(QApplication::Translate('- Select One -'), null); $objParentPagerHouseholdArray = ParentPagerHousehold::LoadAll(); if ($objParentPagerHouseholdArray) { foreach ($objParentPagerHouseholdArray as $objParentPagerHousehold) { $objListItem = new QListItem($objParentPagerHousehold->__toString(), $objParentPagerHousehold->Id); if ($this->objParentPagerAddress->ParentPagerHousehold && $this->objParentPagerAddress->ParentPagerHousehold->Id == $objParentPagerHousehold->Id) { $objListItem->Selected = true; } $this->lstParentPagerHousehold->AddItem($objListItem); } } } if ($this->lblParentPagerHouseholdId) { $this->lblParentPagerHouseholdId->Text = $this->objParentPagerAddress->ParentPagerHousehold ? $this->objParentPagerAddress->ParentPagerHousehold->__toString() : null; } if ($this->txtAddress1) { $this->txtAddress1->Text = $this->objParentPagerAddress->Address1; } if ($this->lblAddress1) { $this->lblAddress1->Text = $this->objParentPagerAddress->Address1; } if ($this->txtAddress2) { $this->txtAddress2->Text = $this->objParentPagerAddress->Address2; } if ($this->lblAddress2) { $this->lblAddress2->Text = $this->objParentPagerAddress->Address2; } if ($this->txtAddress3) { $this->txtAddress3->Text = $this->objParentPagerAddress->Address3; } if ($this->lblAddress3) { $this->lblAddress3->Text = $this->objParentPagerAddress->Address3; } if ($this->txtCity) { $this->txtCity->Text = $this->objParentPagerAddress->City; } if ($this->lblCity) { $this->lblCity->Text = $this->objParentPagerAddress->City; } if ($this->txtState) { $this->txtState->Text = $this->objParentPagerAddress->State; } if ($this->lblState) { $this->lblState->Text = $this->objParentPagerAddress->State; } if ($this->txtZipCode) { $this->txtZipCode->Text = $this->objParentPagerAddress->ZipCode; } if ($this->lblZipCode) { $this->lblZipCode->Text = $this->objParentPagerAddress->ZipCode; } }