/** * This constructor will only be executed once - afterwards, * the state of the control will be stored into the $_SESSION * and, on future loads, populated from the session state. */ public function __construct($objParentObject) { parent::__construct($objParentObject); $projects = Project::QueryArray(QQ::All(), QQ::OrderBy(QQN::Project()->Name)); foreach ($projects as $project) { $this->AddItem($project->Name, $project->Id); } }
/** * This constructor will only be executed once - afterwards, * the state of the control will be stored into the $_SESSION * and, on future loads, populated from the session state. */ public function __construct($objParentObject, $strControlId) { parent::__construct($objParentObject, $strControlId); $projects = Project::QueryArray(QQ::All(), QQ::OrderBy(QQN::Project()->Name)); foreach ($projects as $project) { $this->AddItem($project->Name, $project->Id); } // Reset the status of the parent form's label to indicate // that the query was actually run $objParentObject->lblStatus->Text = "The query was executed"; }