Example #1
0
File: merge.php Project: alcf/chms
 protected function btnSave_Click($strFormId, $strControlId, $strParameter)
 {
     if (!$this->objSelectedHousehold) {
         QApplication::DisplayAlert('Please Select a Household');
         return;
     }
     $this->objHousehold->MergeHousehold($this->objSelectedHousehold, Person::Load($this->lstHead->SelectedValue));
     $this->RedirectToViewPage();
 }
Example #2
0
File: add.php Project: alcf/chms
 /**
  * Really should only be called as a selection in the MessageDialog for folks that are HouseholdStatusHeadOfOne
  * This will THROW an exception if the person is not a HouseholdStatusHeadOfOne.
  * 
  * This calls to Merge Households and then redirects
  * @return void
  */
 protected function MergeHouseholds()
 {
     if ($this->objPersonToAdd->GetHouseholdStatus() != Person::HouseholdStatusHeadOfOne) {
         throw new Exception('Cannot MergeHouseholds on a Person of HouseholdStatusHeadOfOne');
     }
     // Merge the Households
     $this->objHousehold->MergeHousehold($this->objPersonToAdd->HouseholdAsHead, $this->objHousehold->HeadPerson);
     $this->RedirectToViewPage();
 }