当前位置: 首页>>代码示例>>PHP>>正文


PHP QQN::Country方法代码示例

本文整理汇总了PHP中QQN::Country方法的典型用法代码示例。如果您正苦于以下问题:PHP QQN::Country方法的具体用法?PHP QQN::Country怎么用?PHP QQN::Country使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QQN的用法示例。


在下文中一共展示了QQN::Country方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Form_Create

 protected function Form_Create()
 {
     // Setup DataGrid Columns
     $this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgCountry_EditLinkColumn_Render($_ITEM) ?>');
     $this->colEditLinkColumn->HtmlEntities = false;
     $this->colCountryId = new QDataGridColumn(QApplication::Translate('Country Id'), '<?= $_ITEM->CountryId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Country()->CountryId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Country()->CountryId, false)));
     $this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Country()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Country()->ShortDescription, false)));
     $this->colAbbreviation = new QDataGridColumn(QApplication::Translate('Abbreviation'), '<?= QString::Truncate($_ITEM->Abbreviation, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Country()->Abbreviation), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Country()->Abbreviation, false)));
     $this->colStateFlag = new QDataGridColumn(QApplication::Translate('State Flag'), '<?= ($_ITEM->StateFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::Country()->StateFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Country()->StateFlag, false)));
     $this->colProvinceFlag = new QDataGridColumn(QApplication::Translate('Province Flag'), '<?= ($_ITEM->ProvinceFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::Country()->ProvinceFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Country()->ProvinceFlag, false)));
     // Setup DataGrid
     $this->dtgCountry = new QDataGrid($this);
     $this->dtgCountry->CellSpacing = 0;
     $this->dtgCountry->CellPadding = 4;
     $this->dtgCountry->BorderStyle = QBorderStyle::Solid;
     $this->dtgCountry->BorderWidth = 1;
     $this->dtgCountry->GridLines = QGridLines::Both;
     // Datagrid Paginator
     $this->dtgCountry->Paginator = new QPaginator($this->dtgCountry);
     $this->dtgCountry->ItemsPerPage = 10;
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgCountry->UseAjax = false;
     // Specify the local databind method this datagrid will use
     $this->dtgCountry->SetDataBinder('dtgCountry_Bind');
     $this->dtgCountry->AddColumn($this->colEditLinkColumn);
     $this->dtgCountry->AddColumn($this->colCountryId);
     $this->dtgCountry->AddColumn($this->colShortDescription);
     $this->dtgCountry->AddColumn($this->colAbbreviation);
     $this->dtgCountry->AddColumn($this->colStateFlag);
     $this->dtgCountry->AddColumn($this->colProvinceFlag);
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:31,代码来源:CountryListFormBase.class.php

示例2: lstCountry_Create

 /**
  * Create and setup QListBox lstCountry
  * @param string $strControlId optional ControlId to use
  * @return QListBox
  */
 public function lstCountry_Create($strControlId = null)
 {
     $this->lstCountry = new QListBox($this->objParentObject, $strControlId);
     $this->lstCountry->Name = QApplication::Translate('Country');
     $this->lstCountry->AddItem(QApplication::Translate('- Select One -'), null);
     $objCountryArray = Country::QueryArray(QQ::All(), QQ::OrderBy(QQN::Country()->Name));
     if ($objCountryArray) {
         foreach ($objCountryArray as $objCountry) {
             $objListItem = new QListItem($objCountry->__toString(), $objCountry->Id);
             if ($this->objPerson->Country && $this->objPerson->Country->Id == $objCountry->Id) {
                 $objListItem->Selected = true;
             }
             $this->lstCountry->AddItem($objListItem);
         }
     }
     return $this->lstCountry;
 }
开发者ID:klucznik,项目名称:qcodo-website,代码行数:22,代码来源:PersonMetaControl.class.php

示例3: __construct

 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->dtgCountry_EditLinkColumn_Render($_ITEM) ?>');
     $this->colEditLinkColumn->HtmlEntities = false;
     $this->colCountryId = new QDataGridColumn(QApplication::Translate('Country Id'), '<?= $_ITEM->CountryId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Country()->CountryId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Country()->CountryId, false)));
     $this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Country()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Country()->ShortDescription, false)));
     $this->colAbbreviation = new QDataGridColumn(QApplication::Translate('Abbreviation'), '<?= QString::Truncate($_ITEM->Abbreviation, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Country()->Abbreviation), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Country()->Abbreviation, false)));
     $this->colStateFlag = new QDataGridColumn(QApplication::Translate('State Flag'), '<?= ($_ITEM->StateFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::Country()->StateFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Country()->StateFlag, false)));
     $this->colProvinceFlag = new QDataGridColumn(QApplication::Translate('Province Flag'), '<?= ($_ITEM->ProvinceFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::Country()->ProvinceFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Country()->ProvinceFlag, false)));
     // Setup DataGrid
     $this->dtgCountry = new QDataGrid($this);
     $this->dtgCountry->CellSpacing = 0;
     $this->dtgCountry->CellPadding = 4;
     $this->dtgCountry->BorderStyle = QBorderStyle::Solid;
     $this->dtgCountry->BorderWidth = 1;
     $this->dtgCountry->GridLines = QGridLines::Both;
     // Datagrid Paginator
     $this->dtgCountry->Paginator = new QPaginator($this->dtgCountry);
     $this->dtgCountry->ItemsPerPage = 10;
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgCountry->UseAjax = true;
     // Specify the local databind method this datagrid will use
     $this->dtgCountry->SetDataBinder('dtgCountry_Bind', $this);
     $this->dtgCountry->AddColumn($this->colEditLinkColumn);
     $this->dtgCountry->AddColumn($this->colCountryId);
     $this->dtgCountry->AddColumn($this->colShortDescription);
     $this->dtgCountry->AddColumn($this->colAbbreviation);
     $this->dtgCountry->AddColumn($this->colStateFlag);
     $this->dtgCountry->AddColumn($this->colProvinceFlag);
     // Setup the Create New button
     $this->btnCreateNew = new QButton($this);
     $this->btnCreateNew->Text = QApplication::Translate('Create a New') . ' ' . QApplication::Translate('Country');
     $this->btnCreateNew->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCreateNew_Click'));
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:45,代码来源:CountryListPanelBase.class.php

示例4: ResolveContentItem

 /**
  * Used internally by the Meta-based Add Column tools.
  *
  * Given a QQNode or a Text String, this will return a Country-based QQNode.
  * It will also verify that it is a proper Country-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 == 'country') {
             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 "country".');
         }
     } else {
         if (is_string($mixContent)) {
             switch ($mixContent) {
                 case 'Id':
                     return QQN::Country()->Id;
                 case 'Name':
                     return QQN::Country()->Name;
                 case 'Code':
                     return QQN::Country()->Code;
                 default:
                     throw new QCallerException('Simple Property not found in CountryDataGrid 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');
             }
         }
     }
 }
开发者ID:qcodo,项目名称:qcodo-website,代码行数:53,代码来源:CountryDataGridGen.class.php

示例5: LoadByAbbreviation

 /**
  * Load a single Country object,
  * by Abbreviation Index(es)
  * @param string $strAbbreviation
  * @return Country
  */
 public static function LoadByAbbreviation($strAbbreviation, $objOptionalClauses = null)
 {
     return Country::QuerySingle(QQ::Equal(QQN::Country()->Abbreviation, $strAbbreviation), $objOptionalClauses);
 }
开发者ID:alcf,项目名称:chms,代码行数:10,代码来源:CountryGen.class.php

示例6: LoadByCode

 /**
  * Load a single Country object,
  * by Code Index(es)
  * @param string $strCode
  * @return Country
  */
 public static function LoadByCode($strCode)
 {
     return Country::QuerySingle(QQ::Equal(QQN::Country()->Code, $strCode));
 }
开发者ID:qcodo,项目名称:qcodo-website,代码行数:10,代码来源:CountryGen.class.php

示例7: LoadByCountryId

 /**
  * Load a single Country object,
  * by CountryId Index(es)
  * @param integer $intCountryId
  * @return Country
  */
 public static function LoadByCountryId($intCountryId, $objOptionalClauses = null)
 {
     return Country::QuerySingle(QQ::Equal(QQN::Country()->CountryId, $intCountryId), $objOptionalClauses);
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:10,代码来源:CountryGen.class.php

示例8: LoadByCountryId

 /**
  * Load a single Country object,
  * by CountryId Index(es)
  * @param integer $intCountryId
  * @return Country
  */
 public static function LoadByCountryId($intCountryId)
 {
     return Country::QuerySingle(QQ::Equal(QQN::Country()->CountryId, $intCountryId));
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:10,代码来源:CountryGen.class.php


注:本文中的QQN::Country方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。