コード例 #1
0
 public function render_btnToggleRecords($parControl, $strType)
 {
     $strControlId = 'btnToggleRecordsforaddressofperson' . $strType->Id . 'ofproject' . $this->objProject->Id;
     if (!($objControl = $parControl->GetChildControl($strControlId))) {
         // But in this case the parent control of the button
         // would be this child QDataGrid, don't forget that...
         $person_addresses = Address::QueryCount(QQ::Equal(QQN::Address()->PersonId, $strType->Id));
         if ($person_addresses > 0) {
             $objControl = new QButton($parControl, $strControlId);
             $objControl->Width = 20;
             $objControl->Text = '+';
             $objControl->CssClass = 'inputbutton';
             $objControl->ActionParameter = "{$strType->Id}";
             // Important! for a better coding we want to all
             // actions referer to the child QdataGris stay
             // in the child Qdatagrid, so the actions are now
             // QAjaxControlAction or QServerControlAction, were the
             // controlId parameter is $this, becaouse in $this class
             // is defined the event for this button... kind of easy,
             // and clean.
             $objControl->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnToggleRecords_Click', $this->objParentObject->WaitIcon));
         } else {
             // No addresses to expand; we'll use an empty label control to signify that
             $objControl = new QLabel($parControl, $strControlId);
             $objControl->Text = '';
         }
     }
     // We pass the parameter of "false" to make sure the control doesn't render
     // itself RIGHT HERE - that it instead returns its string rendering result.
     return $objControl->Render(false);
 }
コード例 #2
0
 protected function Form_Create()
 {
     // Setup DataGrid Columns
     $this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgAddress_EditLinkColumn_Render($_ITEM) ?>');
     $this->colEditLinkColumn->HtmlEntities = false;
     $this->colAddressId = new QDataGridColumn(QApplication::Translate('Address Id'), '<?= $_ITEM->AddressId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->AddressId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->AddressId, false)));
     $this->colCompanyId = new QDataGridColumn(QApplication::Translate('Company Id'), '<?= $_FORM->dtgAddress_Company_Render($_ITEM); ?>');
     $this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->ShortDescription, false)));
     $this->colCountryId = new QDataGridColumn(QApplication::Translate('Country Id'), '<?= $_FORM->dtgAddress_Country_Render($_ITEM); ?>');
     $this->colAddress1 = new QDataGridColumn(QApplication::Translate('Address 1'), '<?= QString::Truncate($_ITEM->Address1, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->Address1), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->Address1, false)));
     $this->colAddress2 = new QDataGridColumn(QApplication::Translate('Address 2'), '<?= QString::Truncate($_ITEM->Address2, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->Address2), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->Address2, false)));
     $this->colCity = new QDataGridColumn(QApplication::Translate('City'), '<?= QString::Truncate($_ITEM->City, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->City), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->City, false)));
     $this->colStateProvinceId = new QDataGridColumn(QApplication::Translate('State Province Id'), '<?= $_FORM->dtgAddress_StateProvince_Render($_ITEM); ?>');
     $this->colPostalCode = new QDataGridColumn(QApplication::Translate('Postal Code'), '<?= QString::Truncate($_ITEM->PostalCode, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->PostalCode), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->PostalCode, false)));
     $this->colCreatedBy = new QDataGridColumn(QApplication::Translate('Created By'), '<?= $_FORM->dtgAddress_CreatedByObject_Render($_ITEM); ?>');
     $this->colCreationDate = new QDataGridColumn(QApplication::Translate('Creation Date'), '<?= $_FORM->dtgAddress_CreationDate_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->CreationDate, false)));
     $this->colModifiedBy = new QDataGridColumn(QApplication::Translate('Modified By'), '<?= $_FORM->dtgAddress_ModifiedByObject_Render($_ITEM); ?>');
     $this->colModifiedDate = new QDataGridColumn(QApplication::Translate('Modified Date'), '<?= QString::Truncate($_ITEM->ModifiedDate, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->ModifiedDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->ModifiedDate, false)));
     // Setup DataGrid
     $this->dtgAddress = new QDataGrid($this);
     $this->dtgAddress->CellSpacing = 0;
     $this->dtgAddress->CellPadding = 4;
     $this->dtgAddress->BorderStyle = QBorderStyle::Solid;
     $this->dtgAddress->BorderWidth = 1;
     $this->dtgAddress->GridLines = QGridLines::Both;
     // Datagrid Paginator
     $this->dtgAddress->Paginator = new QPaginator($this->dtgAddress);
     $this->dtgAddress->ItemsPerPage = 10;
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgAddress->UseAjax = false;
     // Specify the local databind method this datagrid will use
     $this->dtgAddress->SetDataBinder('dtgAddress_Bind');
     $this->dtgAddress->AddColumn($this->colEditLinkColumn);
     $this->dtgAddress->AddColumn($this->colAddressId);
     $this->dtgAddress->AddColumn($this->colCompanyId);
     $this->dtgAddress->AddColumn($this->colShortDescription);
     $this->dtgAddress->AddColumn($this->colCountryId);
     $this->dtgAddress->AddColumn($this->colAddress1);
     $this->dtgAddress->AddColumn($this->colAddress2);
     $this->dtgAddress->AddColumn($this->colCity);
     $this->dtgAddress->AddColumn($this->colStateProvinceId);
     $this->dtgAddress->AddColumn($this->colPostalCode);
     $this->dtgAddress->AddColumn($this->colCreatedBy);
     $this->dtgAddress->AddColumn($this->colCreationDate);
     $this->dtgAddress->AddColumn($this->colModifiedBy);
     $this->dtgAddress->AddColumn($this->colModifiedDate);
 }
コード例 #3
0
ファイル: Household.class.php プロジェクト: alcf/chms
 public function GetCurrentAddress()
 {
     return Address::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::Address()->HouseholdId, $this->intId), QQ::Equal(QQN::Address()->CurrentFlag, true)));
 }
コード例 #4
0
 public function lstCompany_Change()
 {
     // Clear out the items from lstAddress
     $this->lstAddress->RemoveAllItems();
     if ($this->lstCompany->SelectedValue) {
         // Load the selected company
         $objCompany = Company::Load($this->lstCompany->SelectedValue);
         // Get all available addresses for that company
         if ($objCompany) {
             $objAddressArray = $objCompany->GetAddressArray();
             $this->lstAddress->Enabled = true;
         } else {
             $objAddressArray = null;
             $this->lstAddress->Enabled = false;
         }
     } else {
         // Or load all addresses for all companies
         $objAddressArray = Address::LoadAll(QQ::Clause(QQ::OrderBy(QQN::Address()->ShortDescription)));
         $this->lstAddress->Enabled = true;
     }
     $this->lstAddress->AddItem('- Select One -', null);
     if ($objAddressArray) {
         foreach ($objAddressArray as $objAddress) {
             $objListItem = new QListItem($objAddress->__toString(), $objAddress->AddressId);
             $this->lstAddress->AddItem($objListItem);
         }
     }
 }
コード例 #5
0
ファイル: shipment_edit.php プロジェクト: proxymoron/tracmor
 protected function lstToCompany_Select()
 {
     $this->disableAdvancedIfInternal();
     // Clear any displayed warnings
     if ($this->lblNewToContact) {
         $this->lblNewToContact->Warning = '';
         $this->lblNewToAddress->Warning = '';
     }
     if ($this->lstToCompany->SelectedValue) {
         $objCompany = Company::Load($this->lstToCompany->SelectedValue);
         if ($objCompany) {
             // Load the values for the 'To Contact' List
             if ($this->lstToContact) {
                 $objToContactArray = Contact::LoadArrayByCompanyId($objCompany->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Contact()->LastName, QQN::Contact()->FirstName)));
                 if ($this->lstToContact->SelectedValue) {
                     $SelectedContactId = $this->lstToContact->SelectedValue;
                 } elseif ($this->objShipment->ToContactId) {
                     $SelectedContactId = $this->objShipment->ToContactId;
                 } else {
                     $SelectedContactId = null;
                 }
                 $this->lstToContact->RemoveAllItems();
                 $this->lstToContact->AddItem('- Select One -', null);
                 if ($objToContactArray) {
                     foreach ($objToContactArray as $objToContact) {
                         $objListItem = new QListItem($objToContact->__toString(), $objToContact->ContactId);
                         if ($SelectedContactId == $objToContact->ContactId) {
                             $objListItem->Selected = true;
                         }
                         $this->lstToContact->AddItem($objListItem);
                     }
                     $this->lstToContact->Enabled = true;
                 }
             }
             // Load the values for the 'To Address' List
             if ($this->lstToAddress) {
                 $objToAddressArray = Address::LoadArrayByCompanyId($objCompany->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Address()->ShortDescription)));
                 if ($this->lstToAddress->SelectedValue) {
                     $SelectedAddressId = $this->lstToAddress->SelectedValue;
                 } elseif ($this->objShipment->ToAddressId) {
                     $SelectedAddressId = $this->objShipment->ToAddressId;
                 } else {
                     $SelectedAddressId = null;
                 }
                 $this->lstToAddress->RemoveAllItems();
                 $this->lstToAddress->AddItem('- Select One -', null);
                 if ($objToAddressArray) {
                     foreach ($objToAddressArray as $objToAddress) {
                         $objListItem = new QListItem($objToAddress->__toString(), $objToAddress->AddressId);
                         if ($SelectedAddressId == $objToAddress->AddressId) {
                             $objListItem->Selected = true;
                         }
                         $this->lstToAddress->AddItem($objListItem);
                     }
                     $this->lstToAddress->Enabled = true;
                     $this->lstToAddress_Select();
                 }
             }
         }
     }
 }
コード例 #6
0
ファイル: company_edit.php プロジェクト: heshuai64/einv2
 protected function dtgAddress_Create()
 {
     $this->dtgAddress = new QDataGrid($this);
     $this->dtgAddress->CellPadding = 5;
     $this->dtgAddress->CellSpacing = 0;
     $this->dtgAddress->CssClass = "datagrid";
     // Enable AJAX - this won't work while using the DB profiler
     $this->dtgAddress->UseAjax = true;
     // Enable Pagination, and set to 20 items per page
     $objPaginator = new QPaginator($this->dtgAddress);
     $this->dtgAddress->Paginator = $objPaginator;
     $this->dtgAddress->ItemsPerPage = 10;
     $this->dtgAddress->AddColumn(new QDataGridColumn(QApplication::Translate('Name'), '<?= $_ITEM->__toStringWithLink("bluelink") ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->ShortDescription, false), 'HtmlEntities' => false, 'CssClass' => "dtg_column")));
     $this->dtgAddress->AddColumn(new QDataGridColumn(QApplication::Translate('Address'), '<?= $_ITEM->__toStringFullAddress() ?>', array('Width' => "200", 'CssClass' => "dtg_column", 'HtmlEntities' => false)));
     $this->dtgAddress->SortColumnIndex = 0;
     $this->dtgAddress->SortDirection = 0;
     $objStyle = $this->dtgAddress->RowStyle;
     $objStyle->ForeColor = '#000000';
     $objStyle->BackColor = '#FFFFFF';
     $objStyle->FontSize = 12;
     $objStyle = $this->dtgAddress->AlternateRowStyle;
     $objStyle->BackColor = '#EFEFEF';
     $objStyle = $this->dtgAddress->HeaderRowStyle;
     $objStyle->ForeColor = '#000000';
     $objStyle->BackColor = '#EFEFEF';
     $objStyle->CssClass = 'dtg_header';
 }
コード例 #7
0
 /**
  * Used internally by the Meta-based Add Column tools.
  *
  * Given a QQNode or a Text String, this will return a Address-based QQNode.
  * It will also verify that it is a proper Address-based QQNode, and will throw an exception otherwise.
  *
  * @param mixed $mixContent
  * @return QQNode
  */
 protected function ResolveContentItem($mixContent)
 {
     if ($mixContent instanceof QQNode) {
         if (!$mixContent->_ParentNode) {
             throw new QCallerException('Content QQNode cannot be a Top Level Node');
         }
         if ($mixContent->_RootTableName == 'address') {
             if ($mixContent instanceof QQReverseReferenceNode && !$mixContent->_PropertyName) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             }
             $objCurrentNode = $mixContent;
             while ($objCurrentNode = $objCurrentNode->_ParentNode) {
                 if (!$objCurrentNode instanceof QQNode) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
                 if ($objCurrentNode instanceof QQReverseReferenceNode && !$objCurrentNode->_PropertyName) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
             }
             return $mixContent;
         } else {
             throw new QCallerException('Content QQNode has a root table of "' . $mixContent->_RootTableName . '". Must be a root of "address".');
         }
     } else {
         if (is_string($mixContent)) {
             switch ($mixContent) {
                 case 'Id':
                     return QQN::Address()->Id;
                 case 'AddressTypeId':
                     return QQN::Address()->AddressTypeId;
                 case 'PersonId':
                     return QQN::Address()->PersonId;
                 case 'Person':
                     return QQN::Address()->Person;
                 case 'HouseholdId':
                     return QQN::Address()->HouseholdId;
                 case 'Household':
                     return QQN::Address()->Household;
                 case 'PrimaryPhoneId':
                     return QQN::Address()->PrimaryPhoneId;
                 case 'PrimaryPhone':
                     return QQN::Address()->PrimaryPhone;
                 case 'Address1':
                     return QQN::Address()->Address1;
                 case 'Address2':
                     return QQN::Address()->Address2;
                 case 'Address3':
                     return QQN::Address()->Address3;
                 case 'City':
                     return QQN::Address()->City;
                 case 'State':
                     return QQN::Address()->State;
                 case 'ZipCode':
                     return QQN::Address()->ZipCode;
                 case 'Country':
                     return QQN::Address()->Country;
                 case 'CurrentFlag':
                     return QQN::Address()->CurrentFlag;
                 case 'InvalidFlag':
                     return QQN::Address()->InvalidFlag;
                 case 'VerificationCheckedFlag':
                     return QQN::Address()->VerificationCheckedFlag;
                 case 'DateUntilWhen':
                     return QQN::Address()->DateUntilWhen;
                 case 'InternationalFlag':
                     return QQN::Address()->InternationalFlag;
                 default:
                     throw new QCallerException('Simple Property not found in AddressDataGrid content: ' . $mixContent);
             }
         } else {
             if ($mixContent instanceof QQAssociationNode) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             } else {
                 throw new QCallerException('Invalid Content type');
             }
         }
     }
 }
コード例 #8
0
ファイル: view.php プロジェクト: alcf/chms
 public function dtgHomeAddresses_Bind()
 {
     $this->dtgHomeAddresses->DataSource = $this->objHousehold->GetAddressArray(QQ::OrderBy(QQN::Address()->CurrentFlag, false, QQN::Address()->AddressTypeId));
 }
コード例 #9
0
 /**
  * Count Addresses
  * by CreatedBy Index(es)
  * @param integer $intCreatedBy
  * @return int
  */
 public static function CountByCreatedBy($intCreatedBy, $objOptionalClauses = null)
 {
     // Call Address::QueryCount to perform the CountByCreatedBy query
     return Address::QueryCount(QQ::Equal(QQN::Address()->CreatedBy, $intCreatedBy), $objOptionalClauses);
 }
コード例 #10
0
ファイル: Person.class.php プロジェクト: alcf/chms
 /**
  * Similar to the codegenned GetAddressArray -- however this will retrieve ALL current and associated
  * Addresss.  Not just personal addresses, but addresses attributed to the current home
  * of a given household.  You must specify the household as well.  If the household is invalid (e.g.
  * the participation doesn't exist), then this will throw.
  * 
  * If NO household is passed in (or NULL), then this will return values for ALL associated households.
  * 
  * @return Address[]
  */
 public function GetAllAssociatedAddressArray(Household $objHousehold = null, $bUseCurrentFlag = true)
 {
     $objToReturn = array();
     // Add Address from a specific household
     if ($objHousehold) {
         if (!HouseholdParticipation::LoadByPersonIdHouseholdId($this->intId, $objHousehold->Id)) {
             throw new QCallerException('Person does not exist in this household');
         }
         foreach ($objHousehold->GetAddressArray() as $objAddress) {
             $objToReturn[] = $objAddress;
         }
         // Add addresses from all households
     } else {
         foreach ($this->GetHouseholdParticipationArray() as $objHouseholdParticipation) {
             foreach ($objHouseholdParticipation->Household->GetAddressArray() as $objAddress) {
                 $objToReturn[] = $objAddress;
             }
         }
     }
     // Now add personal addresses
     foreach ($this->GetAddressArray(QQ::OrderBy(QQN::Address()->Id)) as $objAddress) {
         if ($bUseCurrentFlag) {
             if ($objAddress->CurrentFlag) {
                 $objToReturn[] = $objAddress;
             }
         } else {
             $objToReturn[] = $objAddress;
         }
     }
     return $objToReturn;
 }
コード例 #11
0
 public function lstFromAddress_Create()
 {
     $this->lstFromAddress = new QListBox($this, 'FromAddress');
     $this->lstFromAddress->Name = 'From Address';
     $objFromAddressArray = Address::LoadArrayByCompanyId(QApplication::$TracmorSettings->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Address()->ShortDescription)));
     if (is_array($objFromAddressArray) && count($objFromAddressArray) > 0) {
         foreach ($objFromAddressArray as $objFromAddress) {
             $objListItem = new QListItem($objFromAddress->__toString(), $objFromAddress->AddressId);
             $this->lstFromAddress->AddItem($objListItem);
         }
     }
 }
コード例 #12
0
ファイル: shipment_list.php プロジェクト: jdellinger/tracmor
 public function lstToCompany_Select()
 {
     if ($this->pnlShipmentMassEdit->lstToCompany->SelectedValue) {
         $objCompany = Company::Load($this->pnlShipmentMassEdit->lstToCompany->SelectedValue);
         if ($objCompany) {
             // Load the values for the 'To Contact' List
             if ($this->pnlShipmentMassEdit->lstToContact) {
                 $objToContactArray = Contact::LoadArrayByCompanyId($objCompany->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Contact()->LastName, QQN::Contact()->FirstName)));
                 $this->pnlShipmentMassEdit->lstToContact->RemoveAllItems();
                 if ($objToContactArray) {
                     foreach ($objToContactArray as $objToContact) {
                         $objListItem = new QListItem($objToContact->__toString(), $objToContact->ContactId);
                         $this->pnlShipmentMassEdit->lstToContact->AddItem($objListItem);
                     }
                     $this->pnlShipmentMassEdit->lstToContact->Enabled = true;
                 }
             }
             // Load the values for the 'To Address' List
             if ($this->pnlShipmentMassEdit->lstToAddress) {
                 $objToAddressArray = Address::LoadArrayByCompanyId($objCompany->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Address()->ShortDescription)));
                 $this->pnlShipmentMassEdit->lstToAddress->RemoveAllItems();
                 if ($objToAddressArray) {
                     foreach ($objToAddressArray as $objToAddress) {
                         $objListItem = new QListItem($objToAddress->__toString(), $objToAddress->AddressId);
                         $this->pnlShipmentMassEdit->lstToAddress->AddItem($objListItem);
                     }
                     $this->pnlShipmentMassEdit->lstToAddress->Enabled = true;
                     //$this->lstToAddress_Select();
                 }
             }
         }
     }
 }
コード例 #13
0
 /**
  * Used internally by the Meta-based Add Column tools.
  *
  * Given a QQNode or a Text String, this will return a Address-based QQNode.
  * It will also verify that it is a proper Address-based QQNode, and will throw an exception otherwise.
  *
  * @param mixed $mixContent
  * @return QQNode
  */
 protected function ResolveContentItem($mixContent)
 {
     if ($mixContent instanceof QQNode) {
         if (!$mixContent->_ParentNode) {
             throw new QCallerException('Content QQNode cannot be a Top Level Node');
         }
         if ($mixContent->_RootTableName == 'address') {
             if ($mixContent instanceof QQReverseReferenceNode && !$mixContent->_PropertyName) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             }
             $objCurrentNode = $mixContent;
             while ($objCurrentNode = $objCurrentNode->_ParentNode) {
                 if (!$objCurrentNode instanceof QQNode) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
                 if ($objCurrentNode instanceof QQReverseReferenceNode && !$objCurrentNode->_PropertyName) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
             }
             return $mixContent;
         } else {
             throw new QCallerException('Content QQNode has a root table of "' . $mixContent->_RootTableName . '". Must be a root of "address".');
         }
     } else {
         if (is_string($mixContent)) {
             switch ($mixContent) {
                 case 'AddressId':
                     return QQN::Address()->AddressId;
                 case 'CompanyId':
                     return QQN::Address()->CompanyId;
                 case 'Company':
                     return QQN::Address()->Company;
                 case 'ShortDescription':
                     return QQN::Address()->ShortDescription;
                 case 'CountryId':
                     return QQN::Address()->CountryId;
                 case 'Country':
                     return QQN::Address()->Country;
                 case 'Address1':
                     return QQN::Address()->Address1;
                 case 'Address2':
                     return QQN::Address()->Address2;
                 case 'City':
                     return QQN::Address()->City;
                 case 'StateProvinceId':
                     return QQN::Address()->StateProvinceId;
                 case 'StateProvince':
                     return QQN::Address()->StateProvince;
                 case 'PostalCode':
                     return QQN::Address()->PostalCode;
                 case 'CreatedBy':
                     return QQN::Address()->CreatedBy;
                 case 'CreatedByObject':
                     return QQN::Address()->CreatedByObject;
                 case 'CreationDate':
                     return QQN::Address()->CreationDate;
                 case 'ModifiedBy':
                     return QQN::Address()->ModifiedBy;
                 case 'ModifiedByObject':
                     return QQN::Address()->ModifiedByObject;
                 case 'ModifiedDate':
                     return QQN::Address()->ModifiedDate;
                 case 'AddressCustomFieldHelper':
                     return QQN::Address()->AddressCustomFieldHelper;
                 default:
                     throw new QCallerException('Simple Property not found in AddressDataGrid content: ' . $mixContent);
             }
         } else {
             if ($mixContent instanceof QQAssociationNode) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             } else {
                 throw new QCallerException('Invalid Content type');
             }
         }
     }
 }
コード例 #14
0
 public function dtgAddresses_Bind()
 {
     $this->dtgAddresses->DataSource = Address::QueryArray(QQ::Equal(QQN::Address()->PersonId, $this->objPerson->Id));
 }
コード例 #15
0
 public function __construct($objParentObject, $strSetEditPanelMethod, $strCloseEditPanelMethod, $strControlId = null)
 {
     // Call the Parent
     try {
         parent::__construct($objParentObject, $strControlId);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
     // Record Method Callbacks
     $this->strSetEditPanelMethod = $strSetEditPanelMethod;
     $this->strCloseEditPanelMethod = $strCloseEditPanelMethod;
     // Setup DataGrid Columns
     $this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_CONTROL->ParentControl->dtgAddress_EditLinkColumn_Render($_ITEM) ?>');
     $this->colEditLinkColumn->HtmlEntities = false;
     $this->colAddressId = new QDataGridColumn(QApplication::Translate('Address Id'), '<?= $_ITEM->AddressId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->AddressId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->AddressId, false)));
     $this->colCompanyId = new QDataGridColumn(QApplication::Translate('Company Id'), '<?= $_CONTROL->ParentControl->dtgAddress_Company_Render($_ITEM); ?>');
     $this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->ShortDescription, false)));
     $this->colCountryId = new QDataGridColumn(QApplication::Translate('Country Id'), '<?= $_CONTROL->ParentControl->dtgAddress_Country_Render($_ITEM); ?>');
     $this->colAddress1 = new QDataGridColumn(QApplication::Translate('Address 1'), '<?= QString::Truncate($_ITEM->Address1, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->Address1), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->Address1, false)));
     $this->colAddress2 = new QDataGridColumn(QApplication::Translate('Address 2'), '<?= QString::Truncate($_ITEM->Address2, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->Address2), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->Address2, false)));
     $this->colCity = new QDataGridColumn(QApplication::Translate('City'), '<?= QString::Truncate($_ITEM->City, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->City), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->City, false)));
     $this->colStateProvinceId = new QDataGridColumn(QApplication::Translate('State Province Id'), '<?= $_CONTROL->ParentControl->dtgAddress_StateProvince_Render($_ITEM); ?>');
     $this->colPostalCode = new QDataGridColumn(QApplication::Translate('Postal Code'), '<?= QString::Truncate($_ITEM->PostalCode, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->PostalCode), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->PostalCode, false)));
     $this->colCreatedBy = new QDataGridColumn(QApplication::Translate('Created By'), '<?= $_CONTROL->ParentControl->dtgAddress_CreatedByObject_Render($_ITEM); ?>');
     $this->colCreationDate = new QDataGridColumn(QApplication::Translate('Creation Date'), '<?= $_CONTROL->ParentControl->dtgAddress_CreationDate_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->CreationDate, false)));
     $this->colModifiedBy = new QDataGridColumn(QApplication::Translate('Modified By'), '<?= $_CONTROL->ParentControl->dtgAddress_ModifiedByObject_Render($_ITEM); ?>');
     $this->colModifiedDate = new QDataGridColumn(QApplication::Translate('Modified Date'), '<?= QString::Truncate($_ITEM->ModifiedDate, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Address()->ModifiedDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Address()->ModifiedDate, false)));
     // Setup DataGrid
     $this->dtgAddress = new QDataGrid($this);
     $this->dtgAddress->CellSpacing = 0;
     $this->dtgAddress->CellPadding = 4;
     $this->dtgAddress->BorderStyle = QBorderStyle::Solid;
     $this->dtgAddress->BorderWidth = 1;
     $this->dtgAddress->GridLines = QGridLines::Both;
     // Datagrid Paginator
     $this->dtgAddress->Paginator = new QPaginator($this->dtgAddress);
     $this->dtgAddress->ItemsPerPage = 10;
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgAddress->UseAjax = true;
     // Specify the local databind method this datagrid will use
     $this->dtgAddress->SetDataBinder('dtgAddress_Bind', $this);
     $this->dtgAddress->AddColumn($this->colEditLinkColumn);
     $this->dtgAddress->AddColumn($this->colAddressId);
     $this->dtgAddress->AddColumn($this->colCompanyId);
     $this->dtgAddress->AddColumn($this->colShortDescription);
     $this->dtgAddress->AddColumn($this->colCountryId);
     $this->dtgAddress->AddColumn($this->colAddress1);
     $this->dtgAddress->AddColumn($this->colAddress2);
     $this->dtgAddress->AddColumn($this->colCity);
     $this->dtgAddress->AddColumn($this->colStateProvinceId);
     $this->dtgAddress->AddColumn($this->colPostalCode);
     $this->dtgAddress->AddColumn($this->colCreatedBy);
     $this->dtgAddress->AddColumn($this->colCreationDate);
     $this->dtgAddress->AddColumn($this->colModifiedBy);
     $this->dtgAddress->AddColumn($this->colModifiedDate);
     // Setup the Create New button
     $this->btnCreateNew = new QButton($this);
     $this->btnCreateNew->Text = QApplication::Translate('Create a New') . ' ' . QApplication::Translate('Address');
     $this->btnCreateNew->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCreateNew_Click'));
 }
コード例 #16
0
ファイル: AddressGen.class.php プロジェクト: alcf/chms
 /**
  * Count Addresses
  * by VerificationCheckedFlag Index(es)
  * @param boolean $blnVerificationCheckedFlag
  * @return int
  */
 public static function CountByVerificationCheckedFlag($blnVerificationCheckedFlag, $objOptionalClauses = null)
 {
     // Call Address::QueryCount to perform the CountByVerificationCheckedFlag query
     return Address::QueryCount(QQ::Equal(QQN::Address()->VerificationCheckedFlag, $blnVerificationCheckedFlag), $objOptionalClauses);
 }
コード例 #17
0
    _p($_CONTROL->ParentControl->objSelectedPerson->Name);
    ?>
	<span class="subhead">
	<a href="#" class="cancel" <?php 
    $_CONTROL->ParentControl->pxyViewPerson->RenderAsEvents();
    ?>
>View Individual's Record</a>
	</span>
</h3>

<h4>Associated Addresses</h4>

<ul>
<?php 
    foreach ($_CONTROL->ParentControl->objSelectedPerson->GetHouseholdParticipationArray() as $objParticipation) {
        foreach ($objParticipation->Household->GetAddressArray(QQ::OrderBy(QQN::Address()->CurrentFlag, false)) as $objAddress) {
            ?>
		<li><?php 
            _p($objAddress->AddressShortLine);
            ?>
</li>
<?php 
        }
    }
    foreach ($_CONTROL->ParentControl->objSelectedPerson->GetAddressArray() as $objAddress) {
        ?>
	<li><?php 
        _p($objAddress->AddressShortLine);
        ?>
</li>
<?php 
コード例 #18
0
ファイル: receipt_edit.php プロジェクト: proxymoron/tracmor
 protected function lstToAddress_Create()
 {
     $this->lstToAddress = new QListBox($this);
     $this->lstToAddress->Name = QApplication::Translate('To Address');
     $this->lstToAddress->Required = true;
     if (!$this->blnEditMode) {
         $this->lstToAddress->AddItem('- Select One -', null);
     }
     $objToAddressArray = Address::LoadArrayByCompanyId(QApplication::$TracmorSettings->CompanyId, QQ::Clause(QQ::OrderBy(QQN::Address()->ShortDescription)));
     if ($objToAddressArray) {
         foreach ($objToAddressArray as $objToAddress) {
             $objListItem = new QListItem($objToAddress->__toString(), $objToAddress->AddressId);
             if ($this->objReceipt->ToAddress && $this->objReceipt->ToAddress->AddressId == $objToAddress->AddressId) {
                 $objListItem->Selected = true;
             }
             $this->lstToAddress->AddItem($objListItem);
         }
     }
     $this->lstToAddress->TabIndex = 4;
     $this->intNextTabIndex++;
 }
コード例 #19
0
ファイル: AddressGen.class.php プロジェクト: heshuai64/einv2
 /**
  * Count Addresses
  * by CreatedBy Index(es)
  * @param integer $intCreatedBy
  * @return int
  */
 public static function CountByCreatedBy($intCreatedBy)
 {
     // Call Address::QueryCount to perform the CountByCreatedBy query
     return Address::QueryCount(QQ::Equal(QQN::Address()->CreatedBy, $intCreatedBy));
 }