Ejemplo n.º 1
0
 public function Save($blnForceInsert = false, $blnForceUpdate = false)
 {
     try {
         parent::Save($blnForceInsert, $blnForceUpdate);
         // Get PersonIdArray to Refresh Info for
         $intPersonIdArray = array();
         if ($this->intPersonId) {
             $intPersonIdArray[$this->intPersonId] = true;
         }
         foreach ($this->GetPersonAsMailingArray() as $objPerson) {
             $intPersonIdArray[$objPerson->Id] = true;
         }
         if ($this->Household) {
             foreach ($this->Household->GetHouseholdParticipationArray() as $objHouseholdParticipation) {
                 $intPersonIdArray[$objHouseholdParticipation->PersonId] = true;
             }
         }
         foreach ($intPersonIdArray as $intPersonId => $blnValue) {
             Person::Load($intPersonId)->RefreshPrimaryContactInfo();
         }
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
 }
Ejemplo n.º 2
0
 public function Save($blnForceInsert = false, $blnForceUpdate = false)
 {
     if (!$this->__blnRestored || $blnForceInsert) {
         $this->CreatedBy = QApplication::$objUserAccount->UserAccountId;
         $this->CreationDate = new QDateTime(QDateTime::Now);
     } else {
         $this->ModifiedBy = QApplication::$objUserAccount->UserAccountId;
     }
     parent::Save($blnForceInsert, $blnForceUpdate);
 }