/**
  * This will create a new record or update an existing record given the MS SQL Data Row
  * @param string[] $objRow the mssql_fetch_assoc row result from MS SQL Server
  * @return ParentPagerHousehold
  */
 public static function CreateOrUpdateForMsSqlRow($objRow)
 {
     $intServerIdentifier = $objRow['lngHouseHoldID'];
     $strName = trim($objRow['strHouseHold']);
     $objParentPagerHousehold = ParentPagerHousehold::LoadByServerIdentifier($intServerIdentifier);
     if (!$objParentPagerHousehold) {
         $objParentPagerHousehold = new ParentPagerHousehold();
         $objParentPagerHousehold->ServerIdentifier = $intServerIdentifier;
         $objParentPagerHousehold->HiddenFlag = false;
         $objParentPagerHousehold->ParentPagerSyncStatusTypeId = ParentPagerSyncStatusType::NotYetSynced;
     }
     $objParentPagerHousehold->Name = $strName;
     $objParentPagerHousehold->Save();
     return $objParentPagerHousehold;
 }
 /**
  * This will create a new record or update an existing record given the MS SQL Data Row
  * @param string[] $objRow the mssql_fetch_assoc row result from MS SQL Server
  * @return ParentPagerIndividual
  */
 public static function CreateOrUpdateForMsSqlRow($objRow)
 {
     $intServerIdentifier = $objRow['lngIndividualID'];
     $strFirstName = trim($objRow['strFirstName']);
     $strMiddleName = trim($objRow['strMiddleName']);
     $strLastName = trim($objRow['strLastName']);
     $strPrefix = trim($objRow['strPrefix']);
     $strSuffix = trim($objRow['strSuffix']);
     $strNickname = trim($objRow['strNickName']);
     $intGraduationYear = $objRow['sintGraduationYear'];
     $strDateOfBirth = trim($objRow['dtBirthDate']);
     $strGender = trim(strtoupper($objRow['chrGender']));
     if (!$strGender) {
         $strGender = null;
     }
     $strHouseholdId = trim($objRow['lngHouseholdID']);
     $objParentPagerIndividual = ParentPagerIndividual::LoadByServerIdentifier($intServerIdentifier);
     if (!$objParentPagerIndividual) {
         $objParentPagerIndividual = new ParentPagerIndividual();
         $objParentPagerIndividual->ServerIdentifier = $intServerIdentifier;
         $objParentPagerIndividual->HiddenFlag = false;
         $objParentPagerIndividual->ParentPagerSyncStatusTypeId = ParentPagerSyncStatusType::NotYetSynced;
     }
     $objParentPagerIndividual->FirstName = $strFirstName;
     $objParentPagerIndividual->MiddleName = $strMiddleName;
     $objParentPagerIndividual->LastName = $strLastName;
     $objParentPagerIndividual->Prefix = $strPrefix;
     $objParentPagerIndividual->Suffix = $strSuffix;
     $objParentPagerIndividual->Nickname = $strNickname;
     $objParentPagerIndividual->GraduationYear = $intGraduationYear;
     $objParentPagerIndividual->DateOfBirth = $strDateOfBirth ? new QDateTime($strDateOfBirth) : null;
     $objParentPagerIndividual->Gender = $strGender;
     if ($strHouseholdId) {
         $objParentPagerIndividual->ParentPagerHousehold = ParentPagerHousehold::LoadByServerIdentifier($strHouseholdId);
     }
     $objParentPagerIndividual->Save();
     return $objParentPagerIndividual;
 }