/**
  * Refresh this MetaControl with Data from the local QueryCondition object.
  * @param boolean $blnReload reload QueryCondition from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objQueryCondition->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objQueryCondition->Id;
         }
     }
     if ($this->lstSearchQuery) {
         $this->lstSearchQuery->RemoveAllItems();
         $this->lstSearchQuery->AddItem(QApplication::Translate('- Select One -'), null);
         $objSearchQueryArray = SearchQuery::LoadAll();
         if ($objSearchQueryArray) {
             foreach ($objSearchQueryArray as $objSearchQuery) {
                 $objListItem = new QListItem($objSearchQuery->__toString(), $objSearchQuery->Id);
                 if ($this->objQueryCondition->SearchQuery && $this->objQueryCondition->SearchQuery->Id == $objSearchQuery->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstSearchQuery->AddItem($objListItem);
             }
         }
     }
     if ($this->lblSearchQueryId) {
         $this->lblSearchQueryId->Text = $this->objQueryCondition->SearchQuery ? $this->objQueryCondition->SearchQuery->__toString() : null;
     }
     if ($this->lstOrQueryCondition) {
         $this->lstOrQueryCondition->RemoveAllItems();
         $this->lstOrQueryCondition->AddItem(QApplication::Translate('- Select One -'), null);
         $objOrQueryConditionArray = QueryCondition::LoadAll();
         if ($objOrQueryConditionArray) {
             foreach ($objOrQueryConditionArray as $objOrQueryCondition) {
                 $objListItem = new QListItem($objOrQueryCondition->__toString(), $objOrQueryCondition->Id);
                 if ($this->objQueryCondition->OrQueryCondition && $this->objQueryCondition->OrQueryCondition->Id == $objOrQueryCondition->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstOrQueryCondition->AddItem($objListItem);
             }
         }
     }
     if ($this->lblOrQueryConditionId) {
         $this->lblOrQueryConditionId->Text = $this->objQueryCondition->OrQueryCondition ? $this->objQueryCondition->OrQueryCondition->__toString() : null;
     }
     if ($this->lstQueryOperation) {
         $this->lstQueryOperation->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstQueryOperation->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objQueryOperationArray = QueryOperation::LoadAll();
         if ($objQueryOperationArray) {
             foreach ($objQueryOperationArray as $objQueryOperation) {
                 $objListItem = new QListItem($objQueryOperation->__toString(), $objQueryOperation->Id);
                 if ($this->objQueryCondition->QueryOperation && $this->objQueryCondition->QueryOperation->Id == $objQueryOperation->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstQueryOperation->AddItem($objListItem);
             }
         }
     }
     if ($this->lblQueryOperationId) {
         $this->lblQueryOperationId->Text = $this->objQueryCondition->QueryOperation ? $this->objQueryCondition->QueryOperation->__toString() : null;
     }
     if ($this->lstQueryNode) {
         $this->lstQueryNode->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstQueryNode->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objQueryNodeArray = QueryNode::LoadAll();
         if ($objQueryNodeArray) {
             foreach ($objQueryNodeArray as $objQueryNode) {
                 $objListItem = new QListItem($objQueryNode->__toString(), $objQueryNode->Id);
                 if ($this->objQueryCondition->QueryNode && $this->objQueryCondition->QueryNode->Id == $objQueryNode->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstQueryNode->AddItem($objListItem);
             }
         }
     }
     if ($this->lblQueryNodeId) {
         $this->lblQueryNodeId->Text = $this->objQueryCondition->QueryNode ? $this->objQueryCondition->QueryNode->__toString() : null;
     }
     if ($this->txtValue) {
         $this->txtValue->Text = $this->objQueryCondition->Value;
     }
     if ($this->lblValue) {
         $this->lblValue->Text = $this->objQueryCondition->Value;
     }
     if ($this->lstQueryConditionAsOr) {
         $this->lstQueryConditionAsOr->RemoveAllItems();
         $this->lstQueryConditionAsOr->AddItem(QApplication::Translate('- Select One -'), null);
         $objQueryConditionArray = QueryCondition::LoadAll();
         if ($objQueryConditionArray) {
             foreach ($objQueryConditionArray as $objQueryCondition) {
                 $objListItem = new QListItem($objQueryCondition->__toString(), $objQueryCondition->Id);
                 if ($objQueryCondition->OrQueryConditionId == $this->objQueryCondition->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstQueryConditionAsOr->AddItem($objListItem);
             }
         }
     }
     if ($this->lblQueryConditionAsOr) {
         $this->lblQueryConditionAsOr->Text = $this->objQueryCondition->QueryConditionAsOr ? $this->objQueryCondition->QueryConditionAsOr->__toString() : null;
     }
 }