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


PHP QQ::Orderby方法代码示例

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


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

示例1: dtgAssetTransaction_Create

 protected function dtgAssetTransaction_Create()
 {
     $this->dtgAssetTransaction = new QDataGrid($this);
     $this->dtgAssetTransaction->Name = 'Transactions';
     $this->dtgAssetTransaction->CellPadding = 5;
     $this->dtgAssetTransaction->CellSpacing = 0;
     $this->dtgAssetTransaction->CssClass = "datagrid";
     // Enable AJAX - this won't work while using the DB profiler
     $this->dtgAssetTransaction->UseAjax = true;
     // Enable Pagination, and set to 20 items per page
     $objPaginator = new QPaginator($this->dtgAssetTransaction);
     $this->dtgAssetTransaction->Paginator = $objPaginator;
     $this->dtgAssetTransaction->ItemsPerPage = 20;
     $this->dtgAssetTransaction->AddColumn(new QDataGridColumn('Transaction Type', '<?= $_ITEM->Transaction->__toStringWithLink() ?>', array('OrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->Transaction->TransactionType->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->Transaction->TransactionType->ShortDescription, false), 'CssClass' => "dtg_column", 'HtmlEntities' => false)));
     $this->dtgAssetTransaction->AddColumn(new QDataGridColumn('From', '<?= $_ITEM->__toStringSourceLocation() ?>', array('OrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->SourceLocation->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->SourceLocation->ShortDescription, false), 'CssClass' => "dtg_column")));
     $this->dtgAssetTransaction->AddColumn(new QDataGridColumn('To', '<?= $_ITEM->__toStringDestinationLocation() ?>', array('OrderByClause' => QQ::Orderby(QQN::AssetTransaction()->DestinationLocation->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->DestinationLocation->ShortDescription, false), 'CssClass' => "dtg_column")));
     $this->dtgAssetTransaction->AddColumn(new QDataGridColumn('User', '<?= $_ITEM->Transaction->CreatedByObject->__toStringFullName() ?>', array('OrderByClause' => QQ::Orderby(QQN::AssetTransaction()->CreatedByObject->LastName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->CreatedByObject->LastName, false), 'CssClass' => "dtg_column")));
     $this->dtgAssetTransaction->AddColumn(new QDataGridColumn('Date', '<?= $_ITEM->Transaction->CreationDate->PHPDate("Y-m-d H:i:s"); ?>', array('OrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->Transaction->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->Transaction->CreationDate, false), 'CssClass' => "dtg_column")));
     $this->dtgAssetTransaction->SortColumnIndex = 4;
     $this->dtgAssetTransaction->SortDirection = 1;
     $objStyle = $this->dtgAssetTransaction->RowStyle;
     $objStyle->ForeColor = '#000000';
     $objStyle->BackColor = '#FFFFFF';
     $objStyle->FontSize = 12;
     $objStyle = $this->dtgAssetTransaction->AlternateRowStyle;
     $objStyle->BackColor = '#EFEFEF';
     $objStyle = $this->dtgAssetTransaction->HeaderRowStyle;
     $objStyle->ForeColor = '#000000';
     $objStyle->BackColor = '#EFEFEF';
     $objStyle->CssClass = 'dtg_header';
 }
开发者ID:brustj,项目名称:tracmor,代码行数:31,代码来源:QAssetEditComposite.class.php


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