protected function CheckAvailabilityOfUserId($CallFromValidation = null) { if ($this->txtMemberId->Text != '') { $objcondition = QQ::Equal(QQN::Memberdetails()->MemberId, $this->txtMemberId->Text); $cnt = Memberdetails::QueryCount($objcondition); if ($cnt == 0) { if (isset($CallFromValidation)) { $this->txtMemberId->Instructions = 'User is Available.'; return true; } else { $this->txtMemberId->Instructions = 'User is Available.'; return true; //QApplicationBase::DisplayAlert('User is Available'); } } else { $this->txtMemberId->Warning = 'User Id is not available' . ($this->txtMemberId->Instructions = ''); //QApplicationBase::DisplayAlert('User is not Available'); return false; } } else { $this->txtMemberId->Focus(); QApplicationBase::DisplayAlert('Please choose a User Name'); } }
private function GetAssetsData($productgroup) { $objClauses = array(); array_push($objClauses, QQ::OrderBy(QQN::Myassets()->Title)); if ($objClause = $this->dtrMyLibrary->LimitClause) { array_push($objClauses, $this->dtrMyLibrary->LimitClause); } if ($this->txtSearchTerm->Text == "") { $condition = QQ::AndCondition(QQ::Equal(QQN::Myassets()->ProductGroup, $productgroup), QQ::Equal(QQN::Myassets()->Owner, $_SESSION['User'])); $arrResult = Myassets::QueryArray($condition, $objClauses); $this->dtrMyLibrary->TotalItemCount = Myassets::QueryCount($condition); $this->dtrMyLibrary->DataSource = $arrResult; } else { $objCondition = QQ::AndCondition(QQ::OrCondition(QQ::Like(QQN::Myassets()->Title, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Author, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Artist, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Actor, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Director, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Publisher, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Label, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Isbn, '%' . $this->txtSearchTerm->Text . '%')), QQ::Equal(QQN::Myassets()->ProductGroup, $productgroup), QQ::Equal(QQN::Myassets()->Owner, $_SESSION['User'])); $objDbResult = Myassets::QueryArray($objCondition, $objClauses); $myassets = $objDbResult; $this->dtrMyLibrary->TotalItemCount = Myassets::QueryCount($objCondition); if ($this->dtrMyLibrary->TotalItemCount > 0) { $this->dtrMyLibrary->DataSource = $myassets; } else { QApplicationBase::DisplayAlert('No ' . $productgroup . 's exists for the searched term'); } } }