protected function btnSearch_Click() { $this->dtrAssetLog_Bind(); } protected function dtrAssetLog_Bind() { $result = $this->GetAssetLog(); $this->dtrAssetLog->TotalItemCount = sizeof($result); $this->dtrAssetLog->DataSource = $result; } protected function GetAssetLog() { $objClauses = array(); array_push($objClauses, QQ::OrderBy(QQN::Assetsauditlog()->RealReturnDate)); if ($this->txtSearchTerm->Text == "") { $condition = QQ::Equal(QQN::Assetsauditlog()->Owner, $_SESSION['User']); $myassets = Assetsauditlog::QueryArray($condition, $objClauses); } else { $objCondition = QQ::AndCondition(QQ::OrCondition(QQ::Like(QQN::Assetsauditlog()->Asin, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Assetsauditlog()->Email, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Assetsauditlog()->Title, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Assetsauditlog()->FullName, '%' . $this->txtSearchTerm->Text . '%')), QQ::Equal(QQN::Assetsauditlog()->Owner, $_SESSION['User'])); $objDbResult = Assetsauditlog::QueryArray($objCondition, $objClauses); $myassets = $objDbResult; } return $myassets; } protected function pnlHeader_Create() { $this->pnlHeader = new pnlHeader($this, 'CloseEditPane'); } } AssetLog::Run('AssetLog');