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