protected function lstParameter_Create() { $this->lstParameter = new QListBox($this); $this->lstParameter->Name = QApplication::Translate('Parameter'); $this->lstParameter->AddItem(QApplication::Translate('- Select One -'), null); $objParameterArray = Parameter::LoadAll(); if ($objParameterArray) { foreach ($objParameterArray as $objParameter) { $objListItem = new QListItem($objParameter->__toString(), $objParameter->Id); if ($objParameter->VariableId == $this->objVariable->Id) { $objListItem->Selected = true; } $this->lstParameter->AddItem($objListItem); } } // Because Parameter's Parameter is not null, if a value is already selected, it cannot be changed. if ($this->lstParameter->SelectedValue) { $this->lstParameter->Enabled = false; } }
public function dtgParameter_Bind() { // Get Total Count b/c of Pagination $this->dtgParameter->TotalItemCount = Parameter::CountAll(); $objClauses = array(); if ($objClause = $this->dtgParameter->OrderByClause) { array_push($objClauses, $objClause); } if ($objClause = $this->dtgParameter->LimitClause) { array_push($objClauses, $objClause); } $this->dtgParameter->DataSource = Parameter::LoadAll($objClauses); }