示例#1
0
 public function RenderAddresses(ParentPagerIndividual $objIndividual)
 {
     $objAddressArray = $objIndividual->GetParentPagerAddressArray();
     if ($objIndividual->ParentPagerHousehold) {
         $objAddressArray = array_merge($objAddressArray, $objIndividual->ParentPagerHousehold->GetParentPagerAddressArray());
     }
     $strToReturnArray = array();
     foreach ($objAddressArray as $objAddress) {
         $strToReturnArray[] = QApplication::HtmlEntities($objAddress->Address1) . ', ' . QApplication::HtmlEntities($objAddress->City);
     }
     return implode('<br/>', $strToReturnArray);
 }
 /**
  * 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 ParentPagerChildHistory
  */
 public static function CreateOrUpdateForMsSqlRow($objRow)
 {
     $intServerIdentifier = $objRow['lngChildHistoryID'];
     $intIndividualIdentifier = $objRow['lngIndividualID'];
     $intStationIdentifier = $objRow['lngStationID'];
     $intPeriodIdentifier = $objRow['lngPeriodID'];
     $intDropoffIndividualIdentifier = $objRow['lngDropOffByID'];
     $intPickupIndividualIdentifier = $objRow['lngPickupByID'];
     $dttDateIn = new QDateTime($objRow['dtmCheckInDateTime']);
     $dttDateOut = new QDateTime($objRow['dtmCheckOutDateTime']);
     $objParentPagerChildHistory = ParentPagerChildHistory::LoadByServerIdentifier($intServerIdentifier);
     if (!$objParentPagerChildHistory) {
         $objParentPagerChildHistory = new ParentPagerChildHistory();
         $objParentPagerChildHistory->ServerIdentifier = $intServerIdentifier;
     }
     $objParentPagerChildHistory->ParentPagerIndividual = ParentPagerIndividual::LoadByServerIdentifier($intIndividualIdentifier);
     $objParentPagerChildHistory->ParentPagerStation = ParentPagerStation::LoadByServerIdentifier($intStationIdentifier);
     $objParentPagerChildHistory->ParentPagerPeriod = ParentPagerPeriod::LoadByServerIdentifier($intPeriodIdentifier);
     $objParentPagerChildHistory->DropoffByParentPagerIndividual = ParentPagerIndividual::LoadByServerIdentifier($intDropoffIndividualIdentifier);
     $objParentPagerChildHistory->PickupByParentPagerIndividual = ParentPagerIndividual::LoadByServerIdentifier($intPickupIndividualIdentifier);
     $objParentPagerChildHistory->DateIn = $dttDateIn;
     $objParentPagerChildHistory->DateOut = $dttDateOut;
     $objParentPagerChildHistory->Save();
     return $objParentPagerChildHistory;
 }
示例#3
0
 /**
  * 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;
 }
 /**
  * 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 ParentPagerAttendantHistory
  */
 public static function CreateOrUpdateForMsSqlRow($objRow)
 {
     $intServerIdentifier = $objRow['lngAttendantHistoryID'];
     $intIndividualIdentifier = $objRow['lngIndividualID'];
     $intStationIdentifier = $objRow['lngStationID'];
     $intPeriodIdentifier = $objRow['lngPeriodID'];
     $intProgramIdentifier = $objRow['lngProgramID'];
     $dttDateIn = new QDateTime($objRow['dtmStartDateTime']);
     $dttDateOut = new QDateTime($objRow['dtmEndDateTime']);
     $objParentPagerAttendantHistory = ParentPagerAttendantHistory::LoadByServerIdentifier($intServerIdentifier);
     if (!$objParentPagerAttendantHistory) {
         $objParentPagerAttendantHistory = new ParentPagerAttendantHistory();
         $objParentPagerAttendantHistory->ServerIdentifier = $intServerIdentifier;
     }
     $objParentPagerAttendantHistory->ParentPagerIndividual = ParentPagerIndividual::LoadByServerIdentifier($intIndividualIdentifier);
     $objParentPagerAttendantHistory->ParentPagerStation = ParentPagerStation::LoadByServerIdentifier($intStationIdentifier);
     $objParentPagerAttendantHistory->ParentPagerPeriod = ParentPagerPeriod::LoadByServerIdentifier($intPeriodIdentifier);
     $objParentPagerAttendantHistory->ParentPagerProgram = ParentPagerProgram::LoadByServerIdentifier($intProgramIdentifier);
     $objParentPagerAttendantHistory->DateIn = $dttDateIn;
     $objParentPagerAttendantHistory->DateOut = $dttDateOut;
     $objParentPagerAttendantHistory->Save();
     return $objParentPagerAttendantHistory;
 }
 /**
  * Static Helper Method to Create using PK arguments
  * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
  * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
  * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
  * edit, or if we are also allowed to create a new one, etc.
  * 
  * @param mixed $objParentObject QForm or QPanel which will be using this ParentPagerIndividualMetaControl
  * @param integer $intId primary key value
  * @param QMetaControlCreateType $intCreateType rules governing ParentPagerIndividual object creation - defaults to CreateOrEdit
  * @return ParentPagerIndividualMetaControl
  */
 public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit)
 {
     // Attempt to Load from PK Arguments
     if (strlen($intId)) {
         $objParentPagerIndividual = ParentPagerIndividual::Load($intId);
         // ParentPagerIndividual was found -- return it!
         if ($objParentPagerIndividual) {
             return new ParentPagerIndividualMetaControl($objParentObject, $objParentPagerIndividual);
         } else {
             if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) {
                 throw new QCallerException('Could not find a ParentPagerIndividual object with PK arguments: ' . $intId);
             }
         }
         // If EditOnly is specified, throw an exception
     } else {
         if ($intCreateType == QMetaControlCreateType::EditOnly) {
             throw new QCallerException('No PK arguments specified');
         }
     }
     // If we are here, then we need to create a new record
     return new ParentPagerIndividualMetaControl($objParentObject, new ParentPagerIndividual());
 }
 /**
  * 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;
     }
 }
 public static function GetSoapArrayFromArray($objArray)
 {
     if (!$objArray) {
         return null;
     }
     $objArrayToReturn = array();
     foreach ($objArray as $objObject) {
         array_push($objArrayToReturn, ParentPagerIndividual::GetSoapObjectFromObject($objObject, true));
     }
     return unserialize(serialize($objArrayToReturn));
 }
示例#8
0
    /**
     * Deletes all associated ParentPagerIndividuals
     * @return void
     */
    public function DeleteAllParentPagerIndividuals()
    {
        if (is_null($this->intId)) {
            throw new QUndefinedPrimaryKeyException('Unable to call UnassociateParentPagerIndividual on this unsaved Person.');
        }
        // Get the Database Object for this Class
        $objDatabase = Person::GetDatabase();
        // Journaling
        if ($objDatabase->JournalingDatabase) {
            foreach (ParentPagerIndividual::LoadArrayByPersonId($this->intId) as $objParentPagerIndividual) {
                $objParentPagerIndividual->Journal('DELETE');
            }
        }
        // Perform the SQL Query
        $objDatabase->NonQuery('
				DELETE FROM
					`parent_pager_individual`
				WHERE
					`person_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
    }
 /**
  * Refresh this MetaControl with Data from the local ParentPagerChildHistory object.
  * @param boolean $blnReload reload ParentPagerChildHistory from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objParentPagerChildHistory->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objParentPagerChildHistory->Id;
         }
     }
     if ($this->txtServerIdentifier) {
         $this->txtServerIdentifier->Text = $this->objParentPagerChildHistory->ServerIdentifier;
     }
     if ($this->lblServerIdentifier) {
         $this->lblServerIdentifier->Text = $this->objParentPagerChildHistory->ServerIdentifier;
     }
     if ($this->lstParentPagerIndividual) {
         $this->lstParentPagerIndividual->RemoveAllItems();
         if (!$this->blnEditMode) {
             $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->objParentPagerChildHistory->ParentPagerIndividual && $this->objParentPagerChildHistory->ParentPagerIndividual->Id == $objParentPagerIndividual->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstParentPagerIndividual->AddItem($objListItem);
             }
         }
     }
     if ($this->lblParentPagerIndividualId) {
         $this->lblParentPagerIndividualId->Text = $this->objParentPagerChildHistory->ParentPagerIndividual ? $this->objParentPagerChildHistory->ParentPagerIndividual->__toString() : null;
     }
     if ($this->lstParentPagerStation) {
         $this->lstParentPagerStation->RemoveAllItems();
         $this->lstParentPagerStation->AddItem(QApplication::Translate('- Select One -'), null);
         $objParentPagerStationArray = ParentPagerStation::LoadAll();
         if ($objParentPagerStationArray) {
             foreach ($objParentPagerStationArray as $objParentPagerStation) {
                 $objListItem = new QListItem($objParentPagerStation->__toString(), $objParentPagerStation->Id);
                 if ($this->objParentPagerChildHistory->ParentPagerStation && $this->objParentPagerChildHistory->ParentPagerStation->Id == $objParentPagerStation->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstParentPagerStation->AddItem($objListItem);
             }
         }
     }
     if ($this->lblParentPagerStationId) {
         $this->lblParentPagerStationId->Text = $this->objParentPagerChildHistory->ParentPagerStation ? $this->objParentPagerChildHistory->ParentPagerStation->__toString() : null;
     }
     if ($this->lstParentPagerPeriod) {
         $this->lstParentPagerPeriod->RemoveAllItems();
         $this->lstParentPagerPeriod->AddItem(QApplication::Translate('- Select One -'), null);
         $objParentPagerPeriodArray = ParentPagerPeriod::LoadAll();
         if ($objParentPagerPeriodArray) {
             foreach ($objParentPagerPeriodArray as $objParentPagerPeriod) {
                 $objListItem = new QListItem($objParentPagerPeriod->__toString(), $objParentPagerPeriod->Id);
                 if ($this->objParentPagerChildHistory->ParentPagerPeriod && $this->objParentPagerChildHistory->ParentPagerPeriod->Id == $objParentPagerPeriod->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstParentPagerPeriod->AddItem($objListItem);
             }
         }
     }
     if ($this->lblParentPagerPeriodId) {
         $this->lblParentPagerPeriodId->Text = $this->objParentPagerChildHistory->ParentPagerPeriod ? $this->objParentPagerChildHistory->ParentPagerPeriod->__toString() : null;
     }
     if ($this->lstDropoffByParentPagerIndividual) {
         $this->lstDropoffByParentPagerIndividual->RemoveAllItems();
         $this->lstDropoffByParentPagerIndividual->AddItem(QApplication::Translate('- Select One -'), null);
         $objDropoffByParentPagerIndividualArray = ParentPagerIndividual::LoadAll();
         if ($objDropoffByParentPagerIndividualArray) {
             foreach ($objDropoffByParentPagerIndividualArray as $objDropoffByParentPagerIndividual) {
                 $objListItem = new QListItem($objDropoffByParentPagerIndividual->__toString(), $objDropoffByParentPagerIndividual->Id);
                 if ($this->objParentPagerChildHistory->DropoffByParentPagerIndividual && $this->objParentPagerChildHistory->DropoffByParentPagerIndividual->Id == $objDropoffByParentPagerIndividual->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstDropoffByParentPagerIndividual->AddItem($objListItem);
             }
         }
     }
     if ($this->lblDropoffByParentPagerIndividualId) {
         $this->lblDropoffByParentPagerIndividualId->Text = $this->objParentPagerChildHistory->DropoffByParentPagerIndividual ? $this->objParentPagerChildHistory->DropoffByParentPagerIndividual->__toString() : null;
     }
     if ($this->lstPickupByParentPagerIndividual) {
         $this->lstPickupByParentPagerIndividual->RemoveAllItems();
         $this->lstPickupByParentPagerIndividual->AddItem(QApplication::Translate('- Select One -'), null);
         $objPickupByParentPagerIndividualArray = ParentPagerIndividual::LoadAll();
         if ($objPickupByParentPagerIndividualArray) {
             foreach ($objPickupByParentPagerIndividualArray as $objPickupByParentPagerIndividual) {
                 $objListItem = new QListItem($objPickupByParentPagerIndividual->__toString(), $objPickupByParentPagerIndividual->Id);
                 if ($this->objParentPagerChildHistory->PickupByParentPagerIndividual && $this->objParentPagerChildHistory->PickupByParentPagerIndividual->Id == $objPickupByParentPagerIndividual->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPickupByParentPagerIndividual->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPickupByParentPagerIndividualId) {
         $this->lblPickupByParentPagerIndividualId->Text = $this->objParentPagerChildHistory->PickupByParentPagerIndividual ? $this->objParentPagerChildHistory->PickupByParentPagerIndividual->__toString() : null;
     }
     if ($this->calDateIn) {
         $this->calDateIn->DateTime = $this->objParentPagerChildHistory->DateIn;
     }
     if ($this->lblDateIn) {
         $this->lblDateIn->Text = sprintf($this->objParentPagerChildHistory->DateIn) ? $this->objParentPagerChildHistory->__toString($this->strDateInDateTimeFormat) : null;
     }
     if ($this->calDateOut) {
         $this->calDateOut->DateTime = $this->objParentPagerChildHistory->DateOut;
     }
     if ($this->lblDateOut) {
         $this->lblDateOut->Text = sprintf($this->objParentPagerChildHistory->DateOut) ? $this->objParentPagerChildHistory->__toString($this->strDateOutDateTimeFormat) : null;
     }
 }
 /**
  * Main utility method to aid with data binding.  It is used by the default BindAllRows() databinder but
  * could and should be used by any custom databind methods that would be used for instances of this
  * MetaDataGrid, by simply passing in a custom QQCondition and/or QQClause. 
  *
  * If a paginator is set on this DataBinder, it will use it.  If not, then no pagination will be used.
  * It will also perform any sorting (if applicable).
  *
  * @param QQCondition $objConditions override the default condition of QQ::All() to the query, itself
  * @param QQClause[] $objOptionalClauses additional optional QQClause object or array of QQClause objects for the query		 
  * @return void
  */
 public function MetaDataBinder(QQCondition $objCondition = null, $objOptionalClauses = null)
 {
     // Setup input parameters to default values if none passed in
     if (!$objCondition) {
         $objCondition = QQ::All();
     }
     $objClauses = $objOptionalClauses ? $objOptionalClauses : array();
     // We need to first set the TotalItemCount, which will affect the calcuation of LimitClause below
     if ($this->Paginator) {
         $this->TotalItemCount = ParentPagerIndividual::QueryCount($objCondition, $objClauses);
     }
     // If a column is selected to be sorted, and if that column has a OrderByClause set on it, then let's add
     // the OrderByClause to the $objClauses array
     if ($objClause = $this->OrderByClause) {
         array_push($objClauses, $objClause);
     }
     // Add the LimitClause information, as well
     if ($objClause = $this->LimitClause) {
         array_push($objClauses, $objClause);
     }
     // Set the DataSource to be a Query result from ParentPagerIndividual, given the clauses above
     $this->DataSource = ParentPagerIndividual::QueryArray($objCondition, $objClauses);
 }
示例#11
0
文件: link.php 项目: alcf/chms
 protected function Form_Create()
 {
     $this->objParentPagerIndividual = ParentPagerIndividual::Load(QApplication::PathInfo(0));
     if (!$this->objParentPagerIndividual) {
         QApplication::Redirect('/sk/');
     }
     $this->pnlSelectPerson = new SelectPersonPanel($this);
     $this->pnlSelectPerson->Required = true;
     $this->pnlSelectPerson->Name = 'Search NOAH';
     $this->pnlSelectPerson->txtName->Text = $this->objParentPagerIndividual->FirstName . ' ' . $this->objParentPagerIndividual->LastName;
     $this->pnlSelectPerson->txtName_Change();
     $this->pnlSelectPerson->AllowCreate = true;
     switch (strtoupper($this->objParentPagerIndividual->Gender)) {
         case 'M':
             $this->pnlSelectPerson->lstGender->SelectedValue = 'M';
             break;
         case 'F':
             $this->pnlSelectPerson->lstGender->SelectedValue = 'F';
             break;
     }
     if ($this->objParentPagerIndividual->DateOfBirth) {
         $this->pnlSelectPerson->dtxDateOfBirth->Text = $this->objParentPagerIndividual->DateOfBirth->ToString('MMM D YYYY');
     }
     // Report DataGrids
     if ($this->objParentPagerIndividual->CountParentPagerAttendantHistories()) {
         $this->dtgAttendantHistory = new ParentPagerAttendantHistoryDataGrid($this);
         $this->dtgAttendantHistory->MetaAddColumn('DateIn', 'Width=125px', 'FontSize=10px');
         $this->dtgAttendantHistory->MetaAddColumn('DateOut', 'Width=125px', 'FontSize=10px');
         $this->dtgAttendantHistory->MetaAddColumn(QQN::ParentPagerAttendantHistory()->ParentPagerStation->Name, 'Name=Station', 'Width=160px');
         $this->dtgAttendantHistory->MetaAddColumn(QQN::ParentPagerAttendantHistory()->ParentPagerPeriod->Name, 'Name=Period', 'Width=150px');
         $this->dtgAttendantHistory->MetaAddColumn(QQN::ParentPagerAttendantHistory()->ParentPagerProgram->Name, 'Name=Program', 'Width=150px');
         $this->dtgAttendantHistory->SetDataBinder('dtgAttendantHistory_Bind');
         $this->dtgAttendantHistory->Paginator = new QPaginator($this->dtgAttendantHistory);
         $this->dtgAttendantHistory->SortColumnIndex = 0;
         $this->dtgAttendantHistory->SortDirection = 1;
         $this->dtgAttendantHistory->FontSize = '11px';
     }
     if ($this->objParentPagerIndividual->CountParentPagerChildHistories() || $this->objParentPagerIndividual->CountParentPagerChildHistoriesAsPickupBy() || $this->objParentPagerIndividual->CountParentPagerChildHistoriesAsDropoffBy()) {
         $this->dtgChildHistory = new ParentPagerChildHistoryDataGrid($this);
         $this->dtgChildHistory->MetaAddColumn('DateIn', 'Width=125px', 'FontSize=10px');
         $this->dtgChildHistory->MetaAddColumn('DateOut', 'Width=125px', 'FontSize=10px');
         $this->dtgChildHistory->MetaAddColumn(QQN::ParentPagerChildHistory()->ParentPagerIndividual->FirstName, 'Name=Child', 'Width=80px');
         $this->dtgChildHistory->MetaAddColumn(QQN::ParentPagerChildHistory()->PickupByParentPagerIndividual->FirstName, 'Name=Pick Up', 'Width=70px');
         $this->dtgChildHistory->MetaAddColumn(QQN::ParentPagerChildHistory()->DropoffByParentPagerIndividual->FirstName, 'Name=Drop Off', 'Width=70px');
         $this->dtgChildHistory->MetaAddColumn(QQN::ParentPagerChildHistory()->ParentPagerStation->Name, 'Name=Station', 'Width=150px');
         $this->dtgChildHistory->MetaAddColumn(QQN::ParentPagerChildHistory()->ParentPagerPeriod->Name, 'Name=Period', 'Width=70px');
         $this->dtgChildHistory->SetDataBinder('dtgChildHistory_Bind');
         $this->dtgChildHistory->Paginator = new QPaginator($this->dtgChildHistory);
         $this->dtgChildHistory->SortColumnIndex = 0;
         $this->dtgChildHistory->SortDirection = 1;
         $this->dtgChildHistory->FontSize = '11px';
     }
     // Buttons
     $this->btnSave = new QButton($this);
     $this->btnSave->Text = 'Link to NOAH';
     $this->btnSave->AddAction(new QClickEvent(), new QAjaxAction('btnSave_Click'));
     $this->btnSave->CausesValidation = true;
     $this->btnSave->CssClass = 'primary';
     $this->btnCancel = new QLinkButton($this);
     $this->btnCancel->Text = 'Cancel';
     $this->btnCancel->AddAction(new QClickEvent(), new QAjaxAction('btnCancel_Click'));
     $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction());
     $this->btnCancel->CssClass = 'cancel';
     $this->btnHideToggle = new QLinkButton($this);
     $this->btnHideToggle->Text = $this->objParentPagerIndividual->HiddenFlag ? 'Unhide This Unlinked Record' : 'Hide This Unlinked Record';
     $this->btnHideToggle->AddAction(new QClickEvent(), new QAjaxAction('btnHideToggle_Click'));
     $this->btnHideToggle->AddAction(new QClickEvent(), new QTerminateAction());
     $this->btnHideToggle->CssClass = 'delete';
     $this->btnHideToggle->SetCustomStyle('margin-left', 0);
     if ($this->objParentPagerIndividual->ParentPagerSyncStatusTypeId != ParentPagerSyncStatusType::NotYetSynced) {
         $this->btnHideToggle->Visible = false;
     }
 }
示例#12
0
 public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects)
 {
     if ($objObject->objParentPagerIndividual) {
         $objObject->objParentPagerIndividual = ParentPagerIndividual::GetSoapObjectFromObject($objObject->objParentPagerIndividual, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intParentPagerIndividualId = null;
         }
     }
     if ($objObject->objParentPagerHousehold) {
         $objObject->objParentPagerHousehold = ParentPagerHousehold::GetSoapObjectFromObject($objObject->objParentPagerHousehold, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intParentPagerHouseholdId = null;
         }
     }
     return $objObject;
 }
示例#13
0
    print '  -  ID #' . $objRow[$strPkColumnName] . '  -  ' . $objRow['strHouseHold'] . "\r\n";
    ParentPagerHousehold::CreateOrUpdateForMsSqlRow($objRow);
}
///////////////////////////
// ParentPager Individual
////////////////////////////
$strTableName = 'tblIndividual';
$strPkColumnName = 'lngIndividualID';
$intRowCount = GetRowCount($strTableName);
$intCurrentRow = 0;
$objResult = GetPkResultForTableColumn($strTableName, $strPkColumnName);
while ($objRow = mssql_fetch_assoc($objResult)) {
    printf('[%5s/%5s]', $intCurrentRow++, $intRowCount);
    $objRow = GetRowForTableColumnRow($strTableName, $strPkColumnName, $objRow);
    print '  -  ID #' . $objRow[$strPkColumnName] . '  -  ' . $objRow['strFirstName'] . ' ' . $objRow['strLastName'] . "\r\n";
    ParentPagerIndividual::CreateOrUpdateForMsSqlRow($objRow);
}
///////////////////////////
// ParentPager Address
////////////////////////////
$strTableName = 'tblAddress';
$strPkColumnName = 'lngAddressID';
$intRowCount = GetRowCount($strTableName);
$intCurrentRow = 0;
$objResult = GetPkResultForTableColumn($strTableName, $strPkColumnName);
while ($objRow = mssql_fetch_assoc($objResult)) {
    printf('[%5s/%5s]', $intCurrentRow++, $intRowCount);
    $objRow = GetRowForTableColumnRow($strTableName, $strPkColumnName, $objRow);
    print '  -  ID #' . $objRow[$strPkColumnName] . '  -  ' . $objRow['strAddress1'] . ' ' . $objRow['strCity'] . "\r\n";
    ParentPagerAddress::CreateOrUpdateForMsSqlRow($objRow);
}
 public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects)
 {
     if ($objObject->objParentPagerIndividual) {
         $objObject->objParentPagerIndividual = ParentPagerIndividual::GetSoapObjectFromObject($objObject->objParentPagerIndividual, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intParentPagerIndividualId = null;
         }
     }
     if ($objObject->objParentPagerStation) {
         $objObject->objParentPagerStation = ParentPagerStation::GetSoapObjectFromObject($objObject->objParentPagerStation, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intParentPagerStationId = null;
         }
     }
     if ($objObject->objParentPagerPeriod) {
         $objObject->objParentPagerPeriod = ParentPagerPeriod::GetSoapObjectFromObject($objObject->objParentPagerPeriod, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intParentPagerPeriodId = null;
         }
     }
     if ($objObject->objDropoffByParentPagerIndividual) {
         $objObject->objDropoffByParentPagerIndividual = ParentPagerIndividual::GetSoapObjectFromObject($objObject->objDropoffByParentPagerIndividual, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intDropoffByParentPagerIndividualId = null;
         }
     }
     if ($objObject->objPickupByParentPagerIndividual) {
         $objObject->objPickupByParentPagerIndividual = ParentPagerIndividual::GetSoapObjectFromObject($objObject->objPickupByParentPagerIndividual, false);
     } else {
         if (!$blnBindRelatedObjects) {
             $objObject->intPickupByParentPagerIndividualId = null;
         }
     }
     if ($objObject->dttDateIn) {
         $objObject->dttDateIn = $objObject->dttDateIn->__toString(QDateTime::FormatSoap);
     }
     if ($objObject->dttDateOut) {
         $objObject->dttDateOut = $objObject->dttDateOut->__toString(QDateTime::FormatSoap);
     }
     return $objObject;
 }
示例#15
0
 public function pxyLinkIndividual_Click($strFormid, $strControlId, $strParameter)
 {
     $objIndividual = ParentPagerIndividual::Load($strParameter);
     $objIndividual->Person = $this->objPerson;
     $objIndividual->Save();
     $objIndividual->RefreshParentPagerSyncStatusType();
     $this->ReturnTo('#sk');
 }