本文整理汇总了PHP中QQ::OrderBy方法的典型用法代码示例。如果您正苦于以下问题:PHP QQ::OrderBy方法的具体用法?PHP QQ::OrderBy怎么用?PHP QQ::OrderBy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQ
的用法示例。
在下文中一共展示了QQ::OrderBy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Form_Create
protected function Form_Create()
{
// Setup DataGrid Columns
$this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgParameter_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colId = new QDataGridColumn(QApplication::Translate('Id'), '<?= $_ITEM->Id; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Parameter()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Parameter()->Id, false)));
$this->colOperationId = new QDataGridColumn(QApplication::Translate('Operation Id'), '<?= $_FORM->dtgParameter_Operation_Render($_ITEM); ?>');
$this->colOrderNumber = new QDataGridColumn(QApplication::Translate('Order Number'), '<?= $_ITEM->OrderNumber; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Parameter()->OrderNumber), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Parameter()->OrderNumber, false)));
$this->colVariableId = new QDataGridColumn(QApplication::Translate('Variable Id'), '<?= $_FORM->dtgParameter_Variable_Render($_ITEM); ?>');
$this->colReferenceFlag = new QDataGridColumn(QApplication::Translate('Reference Flag'), '<?= ($_ITEM->ReferenceFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::Parameter()->ReferenceFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Parameter()->ReferenceFlag, false)));
// Setup DataGrid
$this->dtgParameter = new QDataGrid($this);
$this->dtgParameter->CellSpacing = 0;
$this->dtgParameter->CellPadding = 4;
$this->dtgParameter->BorderStyle = QBorderStyle::Solid;
$this->dtgParameter->BorderWidth = 1;
$this->dtgParameter->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgParameter->Paginator = new QPaginator($this->dtgParameter);
$this->dtgParameter->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgParameter->UseAjax = false;
// Specify the local databind method this datagrid will use
$this->dtgParameter->SetDataBinder('dtgParameter_Bind');
$this->dtgParameter->AddColumn($this->colEditLinkColumn);
$this->dtgParameter->AddColumn($this->colId);
$this->dtgParameter->AddColumn($this->colOperationId);
$this->dtgParameter->AddColumn($this->colOrderNumber);
$this->dtgParameter->AddColumn($this->colVariableId);
$this->dtgParameter->AddColumn($this->colReferenceFlag);
}
示例2: Form_Create
protected function Form_Create()
{
// Setup DataGrid Columns
$this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgDatagridColumnPreference_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colDatagridColumnPreferenceId = new QDataGridColumn(QApplication::Translate('Datagrid Column Preference Id'), '<?= $_ITEM->DatagridColumnPreferenceId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::DatagridColumnPreference()->DatagridColumnPreferenceId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::DatagridColumnPreference()->DatagridColumnPreferenceId, false)));
$this->colDatagridId = new QDataGridColumn(QApplication::Translate('Datagrid Id'), '<?= $_FORM->dtgDatagridColumnPreference_Datagrid_Render($_ITEM); ?>');
$this->colColumnName = new QDataGridColumn(QApplication::Translate('Column Name'), '<?= QString::Truncate($_ITEM->ColumnName, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::DatagridColumnPreference()->ColumnName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::DatagridColumnPreference()->ColumnName, false)));
$this->colUserAccountId = new QDataGridColumn(QApplication::Translate('User Account Id'), '<?= $_FORM->dtgDatagridColumnPreference_UserAccount_Render($_ITEM); ?>');
$this->colDisplayFlag = new QDataGridColumn(QApplication::Translate('Display Flag'), '<?= ($_ITEM->DisplayFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::DatagridColumnPreference()->DisplayFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::DatagridColumnPreference()->DisplayFlag, false)));
// Setup DataGrid
$this->dtgDatagridColumnPreference = new QDataGrid($this);
$this->dtgDatagridColumnPreference->CellSpacing = 0;
$this->dtgDatagridColumnPreference->CellPadding = 4;
$this->dtgDatagridColumnPreference->BorderStyle = QBorderStyle::Solid;
$this->dtgDatagridColumnPreference->BorderWidth = 1;
$this->dtgDatagridColumnPreference->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgDatagridColumnPreference->Paginator = new QPaginator($this->dtgDatagridColumnPreference);
$this->dtgDatagridColumnPreference->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgDatagridColumnPreference->UseAjax = false;
// Specify the local databind method this datagrid will use
$this->dtgDatagridColumnPreference->SetDataBinder('dtgDatagridColumnPreference_Bind');
$this->dtgDatagridColumnPreference->AddColumn($this->colEditLinkColumn);
$this->dtgDatagridColumnPreference->AddColumn($this->colDatagridColumnPreferenceId);
$this->dtgDatagridColumnPreference->AddColumn($this->colDatagridId);
$this->dtgDatagridColumnPreference->AddColumn($this->colColumnName);
$this->dtgDatagridColumnPreference->AddColumn($this->colUserAccountId);
$this->dtgDatagridColumnPreference->AddColumn($this->colDisplayFlag);
}
示例3: __set
public function __set($strName, $mixValue)
{
switch ($strName) {
case "Expanded":
$this->blnExpanded = $mixValue;
if (!$this->blnDataBound) {
$this->blnDataBound = true;
// Get the class in question
$intClassId = $this->strItemId;
$objClass = QcodoClass::Load($intClassId);
// Bind Children
foreach ($objClass->Operations as $objOperation) {
new QTreeNavItem($objOperation->DisplayName, $intClassId . 'm' . $objOperation->Id, false, $this->objTreeNav->GetItem($intClassId . 'm'), $intClassId . 'm' . $objOperation->Id);
}
foreach ($objClass->GetPropertiesForVariableGroupId(null) as $objProperty) {
new QTreeNavItem($objProperty->DisplayName, $intClassId . 'p' . $objProperty->Id, false, $this->objTreeNav->GetItem($intClassId . 'p'), $intClassId . 'p' . $objProperty->Id);
}
foreach ($objClass->GetVariablesForVariableGroupId(null) as $objClassVariable) {
new QTreeNavItem($objClassVariable->DisplayName, $intClassId . 'v' . $objClassVariable->Id, false, $this->objTreeNav->GetItem($intClassId . 'v'), $intClassId . 'v' . $objClassVariable->Id);
}
foreach ($objClass->GetQcodoConstantArray(QQ::Clause(QQ::OrderBy(QQN::QcodoConstant()->Variable->Name))) as $objConstant) {
new QTreeNavItem($objConstant->Variable->Name, $intClassId . 'c' . $objConstant->Id, false, $this->objTreeNav->GetItem($intClassId . 'c'), $intClassId . 'c' . $objConstant->Id);
}
}
break;
default:
try {
return parent::__set($strName, $mixValue);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
}
}
示例4: Form_Create
protected function Form_Create()
{
if (!QApplication::$Login) {
QApplication::Redirect('/');
}
$this->objQcodoClass = QcodoClass::Load(QApplication::PathInfo(0));
if (!$this->objQcodoClass) {
throw new Exception('Invalid QcodoClass Id: ' . QApplication::PathInfo(0));
}
$this->lblName = new QLabel($this);
$this->lblName->Text = $this->objQcodoClass->Name;
$this->lstClassGroup = new QListBox($this);
$this->lstClassGroup->Name = 'Class Group/Classification';
foreach (ClassGroup::LoadAll(QQ::Clause(QQ::OrderBy(QQN::ClassGroup()->OrderNumber))) as $objClassGroup) {
$this->lstClassGroup->AddItem($objClassGroup->Name, $objClassGroup->Id, $objClassGroup->Id == $this->objQcodoClass->ClassGroupId);
}
$this->chkEnumerationFlag = new QCheckBox($this);
$this->chkEnumerationFlag->Checked = $this->objQcodoClass->EnumerationFlag;
$this->chkEnumerationFlag->Name = 'Enumeration Class Flag';
$this->txtShortDescription = new QTextBox($this);
$this->txtShortDescription->Name = QApplication::Translate('Short Description');
$this->txtShortDescription->Text = $this->objQcodoClass->ShortDescription;
$this->txtShortDescription->TextMode = QTextMode::MultiLine;
$this->txtExtendedDescription = new QWriteBox($this);
$this->txtExtendedDescription->Name = QApplication::Translate('Extended Description');
$this->txtExtendedDescription->Text = $this->objQcodoClass->ExtendedDescription;
$this->btnSave = new QButton($this);
$this->btnSave->Text = 'Save';
$this->btnSave->AddAction(new QClickEvent(), new QServerAction('btnSave_Click'));
$this->btnSave->CausesValidation = true;
$this->btnCancel = new QButton($this);
$this->btnCancel->Text = 'Cancel';
$this->btnCancel->AddAction(new QClickEvent(), new QServerAction('btnCancel_Click'));
$this->btnCancel->CausesValidation = false;
}
示例5: Form_Create
protected function Form_Create()
{
// Define the DataGrid
$this->dtgPersons = new QDataGrid($this);
$this->dtgPersons->CellPadding = 5;
$this->dtgPersons->CellSpacing = 0;
// Define Columns
// Note how we add SortByCommand and ReverseSortByCommand properties to each column
$this->dtgPersons->AddColumn(new QDataGridColumn('Person ID', '<?= $_ITEM->Id ?>', 'Width=100', array('OrderByClause' => QQ::OrderBy(QQN::Person()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->Id, false))));
$this->dtgPersons->AddColumn(new QDataGridColumn('First Name', '<?= $_ITEM->FirstName ?>', 'Width=200', array('OrderByClause' => QQ::OrderBy(QQN::Person()->FirstName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->FirstName, false))));
$this->dtgPersons->AddColumn(new QDataGridColumn('Last Name', '<?= $_ITEM->LastName ?>', 'Width=200', array('OrderByClause' => QQ::OrderBy(QQN::Person()->LastName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->LastName, false))));
// Let's pre-default the sorting by last name (column index #2)
$this->dtgPersons->SortColumnIndex = 2;
// Specify the Datagrid's Data Binder method
$this->dtgPersons->SetDataBinder('dtgPersons_Bind');
// Make the DataGrid look nice
$objStyle = $this->dtgPersons->RowStyle;
$objStyle->FontSize = 12;
$objStyle = $this->dtgPersons->AlternateRowStyle;
$objStyle->BackColor = '#f6f6f6';
$objStyle = $this->dtgPersons->HeaderRowStyle;
$objStyle->ForeColor = 'white';
$objStyle->BackColor = '#780000';
// Because browsers will apply different styles/colors for LINKs
// We must explicitly define the ForeColor for the HeaderLink.
// The header row turns into links when the column can be sorted.
$objStyle = $this->dtgPersons->HeaderLinkStyle;
$objStyle->ForeColor = 'white';
}
示例6: dtgAudit_Create
protected function dtgAudit_Create()
{
$this->dtgAudit = new QDataGrid($this);
$this->dtgAudit->Name = 'asset_audit_list';
$this->dtgAudit->CellPadding = 5;
$this->dtgAudit->CellSpacing = 0;
$this->dtgAudit->CssClass = "datagrid";
// Enable Pagination, and set to 1000 items per page
$objPaginator = new QPaginator($this->dtgAudit);
$this->dtgAudit->Paginator = $objPaginator;
$this->dtgAudit->ItemsPerPage = 1000;
$this->dtgAudit->UseAjax = true;
// Allow for column toggling
$this->dtgAudit->ShowColumnToggle = true;
// Allow for CSV Export
$this->dtgAudit->ShowExportCsv = true;
$this->dtgAudit->AddColumn(new QDataGridColumnExt('Location', '<?= $_ITEM->Location->ShortDescription ?>', array('OrderByClause' => QQ::OrderBy(QQN::AuditScan()->LocationId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AuditScan()->LocationId, false), 'CssClass' => 'dtg_column')));
$this->dtgAudit->AddColumn(new QDataGridColumnExt('Asset Code', '<?= $_ITEM->Asset->AssetCode ?>', array('OrderByClause' => QQ::OrderBy(AuditScan::AuditScanExt()->Asset->AssetCode), 'ReverseOrderByClause' => QQ::OrderBy(AuditScan::AuditScanExt()->Asset->AssetCode, false), 'CssClass' => 'dtg_column')));
$this->dtgAudit->AddColumn(new QDataGridColumnExt('Asset Model', '<?= $_ITEM->Asset->AssetModel->ShortDescription ?>', array('OrderByClause' => QQ::OrderBy(AuditScan::AuditScanExt()->Asset->AssetModel->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(AuditScan::AuditScanExt()->Asset->AssetModel->ShortDescription, false), 'CssClass' => 'dtg_column')));
$this->dtgAudit->AddColumn(new QDataGridColumnExt('PDT Count', '<?= $_ITEM->Count ?>', array('OrderByClause' => QQ::OrderBy(QQN::AuditScan()->Count), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AuditScan()->Count, false), 'CssClass' => 'dtg_column')));
$this->dtgAudit->AddColumn(new QDataGridColumnExt('System Count', '<?= $_ITEM->SystemCount ?>', array('OrderByClause' => QQ::OrderBy(QQN::AuditScan()->SystemCount), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AuditScan()->SystemCount, false), 'CssClass' => 'dtg_column')));
$objStyle = $this->dtgAudit->RowStyle;
$objStyle->ForeColor = '#000000';
$objStyle->BackColor = '#FFFFFF';
$objStyle->FontSize = 12;
$objStyle = $this->dtgAudit->AlternateRowStyle;
$objStyle->BackColor = '#EFEFEF';
$objStyle = $this->dtgAudit->HeaderRowStyle;
$objStyle->ForeColor = '#000000';
$objStyle->BackColor = '#EFEFEF';
$objStyle->CssClass = 'dtg_header';
$this->dtgAudit->SetDataBinder('dtgAudit_Bind');
}
示例7: Form_Create
protected function Form_Create()
{
// Define the DataGrid
$this->dtgPersons = new QDataGrid($this);
$this->dtgPersons->CellPadding = 5;
$this->dtgPersons->CellSpacing = 0;
// Let's enable AJAX!!!
$this->dtgPersons->UseAjax = true;
// Enable Pagination, and set to 5 items per page
$objPaginator = new QPaginator($this->dtgPersons);
$this->dtgPersons->Paginator = $objPaginator;
$this->dtgPersons->ItemsPerPage = 20;
// Define Columns
$this->dtgPersons->AddColumn(new QDataGridColumn('Person ID', '<?= $_ITEM->Id ?>', 'Width=100', array('OrderByClause' => QQ::OrderBy(QQN::Person()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->Id, false))));
$this->dtgPersons->AddColumn(new QDataGridColumn('First Name', '<?= $_ITEM->FirstName ?>', 'Width=200', array('OrderByClause' => QQ::OrderBy(QQN::Person()->FirstName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->FirstName, false))));
$this->dtgPersons->AddColumn(new QDataGridColumn('Last Name', '<?= $_ITEM->LastName ?>', 'Width=200', array('OrderByClause' => QQ::OrderBy(QQN::Person()->LastName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->LastName, false))));
// Let's pre-default the sorting by last name (column index #2)
$this->dtgPersons->SortColumnIndex = 2;
// Finally, we define the method that will handle the binding of the data source to the datagrid
$this->dtgPersons->SetDataBinder('dtgPersons_Bind');
// Make the DataGrid look nice
$objStyle = $this->dtgPersons->RowStyle;
$objStyle->FontSize = 12;
$objStyle = $this->dtgPersons->AlternateRowStyle;
$objStyle->BackColor = '#f6f6f6';
}
示例8: Form_Create
protected function Form_Create()
{
// Define the DataGrid
// NOTE: We are using a special QDataGrid subclass that we have defined in the
// included /examples/datagrid/QDataGrid.inc file. Feel free to make changes to the
// main QDataGrid.inc custom subclass, which is located in /includes/qform/QDataGrid.inc.
$this->dtgPersons = new QDataGrid($this);
$this->dtgPersons->CellPadding = 5;
$this->dtgPersons->CellSpacing = 0;
// Enabling AJAX
$this->dtgPersons->UseAjax = true;
// Enable Pagination, and set to 5 items per page
$objPaginator = new QPaginator($this->dtgPersons);
$this->dtgPersons->Paginator = $objPaginator;
$this->dtgPersons->ItemsPerPage = 20;
// Let's create our ALTERNATE paginator
$this->dtgPersons->PaginatorAlternate = new QPaginator($this->dtgPersons);
// Define Columns
$this->dtgPersons->AddColumn(new QDataGridColumn('Person ID', '<?= $_ITEM->Id ?>', 'Width=100', array('OrderByClause' => QQ::OrderBy(QQN::Person()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->Id, false))));
$this->dtgPersons->AddColumn(new QDataGridColumn('First Name', '<?= $_ITEM->FirstName ?>', 'Width=200', array('OrderByClause' => QQ::OrderBy(QQN::Person()->FirstName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->FirstName, false))));
$this->dtgPersons->AddColumn(new QDataGridColumn('Last Name', '<?= $_ITEM->LastName ?>', 'Width=200', array('OrderByClause' => QQ::OrderBy(QQN::Person()->LastName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->LastName, false))));
// Let's pre-default the sorting by last name (column index #2)
$this->dtgPersons->SortColumnIndex = 2;
// Specify the Datagrid's Data Binder method
$this->dtgPersons->SetDataBinder('dtgPersons_Bind');
// Make the DataGrid look nice
$objStyle = $this->dtgPersons->RowStyle;
$objStyle->FontSize = 12;
$objStyle = $this->dtgPersons->AlternateRowStyle;
$objStyle->BackColor = '#f6f6f6';
}
示例9: Form_Create
protected function Form_Create()
{
// Define the DataGrid
$this->dtgPersons = new QDataGrid($this);
$this->dtgPersons->CellPadding = 5;
$this->dtgPersons->CellSpacing = 0;
// Using Ajax for Pagination
$this->dtgPersons->UseAjax = true;
// To create pagination, we will create a new paginator, and specify the datagrid
// as the paginator's parent. (We do this because the datagrid is the control
// who is responsible for rendering the paginator, as opposed to the form.)
$objPaginator = new QPaginator($this->dtgPersons);
$this->dtgPersons->Paginator = $objPaginator;
// Now, with a paginator defined, we can set up some additional properties on
// the datagrid. For purposes of this example, let's make the datagrid show
// only 5 items per page.
$this->dtgPersons->ItemsPerPage = 5;
// Define Columns
$this->dtgPersons->AddColumn(new QDataGridColumn('Person ID', '<?= $_ITEM->Id ?>', 'Width=100', array('OrderByClause' => QQ::OrderBy(QQN::Person()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->Id, false))));
$this->dtgPersons->AddColumn(new QDataGridColumn('First Name', '<?= $_ITEM->FirstName ?>', 'Width=200', array('OrderByClause' => QQ::OrderBy(QQN::Person()->FirstName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->FirstName, false))));
$this->dtgPersons->AddColumn(new QDataGridColumn('Last Name', '<?= $_ITEM->LastName ?>', 'Width=200', array('OrderByClause' => QQ::OrderBy(QQN::Person()->LastName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->LastName, false))));
// Let's pre-default the sorting by last name (column index #2)
$this->dtgPersons->SortColumnIndex = 2;
// Specify the Datagrid's Data Binder method
$this->dtgPersons->SetDataBinder('dtgPersons_Bind');
// Make the DataGrid look nice
$objStyle = $this->dtgPersons->RowStyle;
$objStyle->FontSize = 12;
$objStyle = $this->dtgPersons->AlternateRowStyle;
$objStyle->BackColor = '#f6f6f6';
}
示例10: LoadAllActive
public static function LoadAllActive($objOptionalClauses = null)
{
if (is_null($objOptionalClauses)) {
$objOptionalClauses = array(QQ::OrderBy(QQN::NarroLanguage()->LanguageName));
}
return parent::QueryArray(QQ::AndCondition(QQ::NotEqual(QQN::NarroLanguage()->LanguageCode, NarroLanguage::SOURCE_LANGUAGE_CODE), QQ::Equal(QQN::NarroLanguage()->Active, 1)), $objOptionalClauses);
}
示例11: Form_Create
protected function Form_Create()
{
// Setup DataGrid Columns
// Note that although we are using "Beta 2" style of SortBy and LimitInfo, QDataGrid does have support to "convert" QQ::OrderBy to SortBy strings.
$this->colId = new QDataGridColumn(QApplication::Translate('Id'), '<?= $_ITEM->Id; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Person()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->Id, false)));
/* $this->colId = new QDataGridColumn(QApplication::Translate('Id'), '<?= $_ITEM->Id; ?>', 'SortByCommand="id ASC"', 'ReverseSortByCommand="id DESC"');*/
$this->colFirstName = new QDataGridColumn(QApplication::Translate('First Name'), '<?= $_ITEM->FirstName; ?>', 'SortByCommand="first_name ASC"', 'ReverseSortByCommand="first_name DESC"');
$this->colLastName = new QDataGridColumn(QApplication::Translate('Last Name'), '<?= $_ITEM->LastName; ?>', 'SortByCommand="last_name ASC"', 'ReverseSortByCommand="last_name DESC"');
// Setup DataGrid
$this->dtgPerson = new QDataGrid($this);
$this->dtgPerson->CellSpacing = 0;
$this->dtgPerson->CellPadding = 4;
$this->dtgPerson->BorderStyle = QBorderStyle::Solid;
$this->dtgPerson->BorderWidth = 1;
$this->dtgPerson->GridLines = QGridLines::Both;
$this->dtgPerson->SortColumnIndex = 0;
// Datagrid Paginator
$this->dtgPerson->Paginator = new QPaginator($this->dtgPerson);
$this->dtgPerson->ItemsPerPage = 5;
// Specify Whether or Not to Refresh using Ajax
$this->dtgPerson->UseAjax = true;
// Add the Columns to the DataGrid
$this->dtgPerson->AddColumn($this->colId);
$this->dtgPerson->AddColumn($this->colFirstName);
$this->dtgPerson->AddColumn($this->colLastName);
}
示例12: Form_Create
protected function Form_Create()
{
$this->strInitialToken = QApplication::PathInfo(0);
if ($this->strInitialToken) {
$this->objList = CommunicationList::LoadByToken($this->strInitialToken);
}
$this->chkBtnListArray = array();
foreach (CommunicationList::LoadArrayBySubscribable(true, QQ::OrderBy(QQN::CommunicationList()->Token)) as $objEmailList) {
$objItemList = new QCheckBox($this);
$objItemList->Name = $objEmailList->Token;
$objItemList->Text = $objEmailList->Name . ' - ' . $objEmailList->Description . "\n";
if ($objEmailList->Token == $this->strInitialToken) {
$objItemList->Checked = true;
}
$this->chkBtnListArray[] = $objItemList;
}
$this->txtEmail = new QTextBox($this);
$this->txtEmail->Name = 'Email: ';
$this->txtEmail->Visible = true;
$this->txtFirstName = new QTextBox($this);
$this->txtFirstName->Name = 'First Name: ';
$this->txtFirstName->Visible = true;
$this->txtLastName = new QTextBox($this);
$this->txtLastName->Name = 'Last Name';
$this->txtLastName->Visible = true;
$this->btnSubscribe = new QButton($this);
$this->btnSubscribe->Name = 'Subscribe';
$this->btnSubscribe->Text = 'Subscribe';
$this->btnSubscribe->CssClass = 'primary';
$this->btnSubscribe->Visible = true;
$this->btnSubscribe->AddAction(new QClickEvent(), new QAjaxAction('btnSubscribe_Click'));
$this->lblMessage = new QLabel($this);
$this->lblMessage->FontBold = true;
$this->lblMessage->Visible = false;
}
示例13: Form_Create
protected function Form_Create()
{
// Setup DataGrid Columns
$this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgDirectoryToken_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colId = new QDataGridColumn(QApplication::Translate('Id'), '<?= $_ITEM->Id; ?>', array('OrderByClause' => QQ::OrderBy(QQN::DirectoryToken()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::DirectoryToken()->Id, false)));
$this->colToken = new QDataGridColumn(QApplication::Translate('Token'), '<?= QString::Truncate($_ITEM->Token, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::DirectoryToken()->Token), 'ReverseOrderByClause' => QQ::OrderBy(QQN::DirectoryToken()->Token, false)));
$this->colPath = new QDataGridColumn(QApplication::Translate('Path'), '<?= QString::Truncate($_ITEM->Path, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::DirectoryToken()->Path), 'ReverseOrderByClause' => QQ::OrderBy(QQN::DirectoryToken()->Path, false)));
$this->colCoreFlag = new QDataGridColumn(QApplication::Translate('Core Flag'), '<?= ($_ITEM->CoreFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::DirectoryToken()->CoreFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::DirectoryToken()->CoreFlag, false)));
$this->colRelativeFlag = new QDataGridColumn(QApplication::Translate('Relative Flag'), '<?= ($_ITEM->RelativeFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::DirectoryToken()->RelativeFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::DirectoryToken()->RelativeFlag, false)));
// Setup DataGrid
$this->dtgDirectoryToken = new QDataGrid($this);
$this->dtgDirectoryToken->CellSpacing = 0;
$this->dtgDirectoryToken->CellPadding = 4;
$this->dtgDirectoryToken->BorderStyle = QBorderStyle::Solid;
$this->dtgDirectoryToken->BorderWidth = 1;
$this->dtgDirectoryToken->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgDirectoryToken->Paginator = new QPaginator($this->dtgDirectoryToken);
$this->dtgDirectoryToken->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgDirectoryToken->UseAjax = false;
// Specify the local databind method this datagrid will use
$this->dtgDirectoryToken->SetDataBinder('dtgDirectoryToken_Bind');
$this->dtgDirectoryToken->AddColumn($this->colEditLinkColumn);
$this->dtgDirectoryToken->AddColumn($this->colId);
$this->dtgDirectoryToken->AddColumn($this->colToken);
$this->dtgDirectoryToken->AddColumn($this->colPath);
$this->dtgDirectoryToken->AddColumn($this->colCoreFlag);
$this->dtgDirectoryToken->AddColumn($this->colRelativeFlag);
}
示例14: dtgItems_Bind
public function dtgItems_Bind()
{
$intYear = QApplication::PathInfo(0);
$dttStart = new QDateTime($intYear . '-01-01');
$dttEnd = new QDateTime($dttStart);
$dttEnd->Year += 1;
$dttStart->SetTime(null, null, null);
$dttEnd->SetTime(null, null, null);
$objPersonCursor = Person::QueryCursor(QQ::AndCondition(QQ::GreaterOrEqual(QQN::Person()->StewardshipContribution->DateCredited, $dttStart), QQ::LessThan(QQN::Person()->StewardshipContribution->DateCredited, $dttEnd)), QQ::Clause(QQ::Distinct(), QQ::OrderBy(QQN::Person()->LastName, QQN::Person()->FirstName)));
$strNameArray = array();
$strNameValueArray = array();
while ($objPerson = Person::InstantiateCursor($objPersonCursor)) {
$strToken = strtolower($objPerson->FirstName . '|' . $objPerson->LastName);
$strToken = str_replace(' ', '', $strToken);
$strToken = str_replace('.', '', $strToken);
$strToken = str_replace(',', '', $strToken);
$strToken = str_replace('-', '', $strToken);
$strToken = str_replace('_', '', $strToken);
$strToken = str_replace('/', '', $strToken);
if (array_key_exists($strToken, $strNameArray)) {
$strNameValueArray[$strToken] = $objPerson->FirstName . ' ' . $objPerson->LastName;
}
$strNameArray[$strToken] = true;
}
$this->dtgItems->DataSource = $strNameValueArray;
}
示例15: Form_Create
protected function Form_Create()
{
// Setup DataGrid Columns
$this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgCustomFieldSelection_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colCustomFieldSelectionId = new QDataGridColumn(QApplication::Translate('Custom Field Selection Id'), '<?= $_ITEM->CustomFieldSelectionId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldSelection()->CustomFieldSelectionId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldSelection()->CustomFieldSelectionId, false)));
$this->colCustomFieldValueId = new QDataGridColumn(QApplication::Translate('Custom Field Value Id'), '<?= $_FORM->dtgCustomFieldSelection_CustomFieldValue_Render($_ITEM); ?>');
$this->colEntityQtypeId = new QDataGridColumn(QApplication::Translate('Entity Qtype'), '<?= $_FORM->dtgCustomFieldSelection_EntityQtypeId_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldSelection()->EntityQtypeId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldSelection()->EntityQtypeId, false)));
$this->colEntityId = new QDataGridColumn(QApplication::Translate('Entity Id'), '<?= $_ITEM->EntityId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldSelection()->EntityId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldSelection()->EntityId, false)));
// Setup DataGrid
$this->dtgCustomFieldSelection = new QDataGrid($this);
$this->dtgCustomFieldSelection->CellSpacing = 0;
$this->dtgCustomFieldSelection->CellPadding = 4;
$this->dtgCustomFieldSelection->BorderStyle = QBorderStyle::Solid;
$this->dtgCustomFieldSelection->BorderWidth = 1;
$this->dtgCustomFieldSelection->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgCustomFieldSelection->Paginator = new QPaginator($this->dtgCustomFieldSelection);
$this->dtgCustomFieldSelection->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgCustomFieldSelection->UseAjax = false;
// Specify the local databind method this datagrid will use
$this->dtgCustomFieldSelection->SetDataBinder('dtgCustomFieldSelection_Bind');
$this->dtgCustomFieldSelection->AddColumn($this->colEditLinkColumn);
$this->dtgCustomFieldSelection->AddColumn($this->colCustomFieldSelectionId);
$this->dtgCustomFieldSelection->AddColumn($this->colCustomFieldValueId);
$this->dtgCustomFieldSelection->AddColumn($this->colEntityQtypeId);
$this->dtgCustomFieldSelection->AddColumn($this->colEntityId);
}