/**
  * Refresh this MetaControl with Data from the local Articlemovies object.
  * @param boolean $blnReload reload Articlemovies from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objArticlemovies->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objArticlemovies->Id;
         }
     }
     if ($this->lstReferenceIDObject) {
         $this->lstReferenceIDObject->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstReferenceIDObject->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objReferenceIDObjectArray = Articlecore::LoadAll();
         if ($objReferenceIDObjectArray) {
             foreach ($objReferenceIDObjectArray as $objReferenceIDObject) {
                 $objListItem = new QListItem($objReferenceIDObject->__toString(), $objReferenceIDObject->Id);
                 if ($this->objArticlemovies->ReferenceIDObject && $this->objArticlemovies->ReferenceIDObject->Id == $objReferenceIDObject->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstReferenceIDObject->AddItem($objListItem);
             }
         }
     }
     if ($this->lblReferenceID) {
         $this->lblReferenceID->Text = $this->objArticlemovies->ReferenceIDObject ? $this->objArticlemovies->ReferenceIDObject->__toString() : null;
     }
     if ($this->txtActor) {
         $this->txtActor->Text = $this->objArticlemovies->Actor;
     }
     if ($this->lblActor) {
         $this->lblActor->Text = $this->objArticlemovies->Actor;
     }
     if ($this->txtDirector) {
         $this->txtDirector->Text = $this->objArticlemovies->Director;
     }
     if ($this->lblDirector) {
         $this->lblDirector->Text = $this->objArticlemovies->Director;
     }
     if ($this->txtRunningTime) {
         $this->txtRunningTime->Text = $this->objArticlemovies->RunningTime;
     }
     if ($this->lblRunningTime) {
         $this->lblRunningTime->Text = $this->objArticlemovies->RunningTime;
     }
 }
 /**
  * Refresh this MetaControl with Data from the local Articlebook object.
  * @param boolean $blnReload reload Articlebook from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objArticlebook->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objArticlebook->Id;
         }
     }
     if ($this->lstReferenceIDObject) {
         $this->lstReferenceIDObject->RemoveAllItems();
         $this->lstReferenceIDObject->AddItem(QApplication::Translate('- Select One -'), null);
         $objReferenceIDObjectArray = Articlecore::LoadAll();
         if ($objReferenceIDObjectArray) {
             foreach ($objReferenceIDObjectArray as $objReferenceIDObject) {
                 $objListItem = new QListItem($objReferenceIDObject->__toString(), $objReferenceIDObject->Id);
                 if ($this->objArticlebook->ReferenceIDObject && $this->objArticlebook->ReferenceIDObject->Id == $objReferenceIDObject->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstReferenceIDObject->AddItem($objListItem);
             }
         }
     }
     if ($this->lblReferenceID) {
         $this->lblReferenceID->Text = $this->objArticlebook->ReferenceIDObject ? $this->objArticlebook->ReferenceIDObject->__toString() : null;
     }
     if ($this->txtAuthor) {
         $this->txtAuthor->Text = $this->objArticlebook->Author;
     }
     if ($this->lblAuthor) {
         $this->lblAuthor->Text = $this->objArticlebook->Author;
     }
     if ($this->txtEdition) {
         $this->txtEdition->Text = $this->objArticlebook->Edition;
     }
     if ($this->lblEdition) {
         $this->lblEdition->Text = $this->objArticlebook->Edition;
     }
     if ($this->txtNumberOfPages) {
         $this->txtNumberOfPages->Text = $this->objArticlebook->NumberOfPages;
     }
     if ($this->lblNumberOfPages) {
         $this->lblNumberOfPages->Text = $this->objArticlebook->NumberOfPages;
     }
     if ($this->calPublicationDate) {
         $this->calPublicationDate->DateTime = $this->objArticlebook->PublicationDate;
     }
     if ($this->lblPublicationDate) {
         $this->lblPublicationDate->Text = sprintf($this->objArticlebook->PublicationDate) ? $this->objArticlebook->__toString($this->strPublicationDateDateTimeFormat) : null;
     }
     if ($this->txtPublisher) {
         $this->txtPublisher->Text = $this->objArticlebook->Publisher;
     }
     if ($this->lblPublisher) {
         $this->lblPublisher->Text = $this->objArticlebook->Publisher;
     }
     if ($this->txtIsbn) {
         $this->txtIsbn->Text = $this->objArticlebook->Isbn;
     }
     if ($this->lblIsbn) {
         $this->lblIsbn->Text = $this->objArticlebook->Isbn;
     }
 }
 /**
  * Default / simple DataBinder for this Meta DataGrid.  This can easily be overridden
  * by calling SetDataBinder() on this DataGrid with another DataBinder of your choice.
  *
  * If a paginator is set on this DataBinder, it will use it.  If not, then no pagination will be used.
  * It will also perform any sorting (if applicable).
  */
 public function MetaDataBinder()
 {
     // Remember!  We need to first set the TotalItemCount, which will affect the calcuation of LimitClause below
     if ($this->Paginator) {
         $this->TotalItemCount = Articlecore::CountAll();
     }
     // Setup the $objClauses Array
     $objClauses = array();
     // If a column is selected to be sorted, and if that column has a OrderByClause set on it, then let's add
     // the OrderByClause to the $objClauses array
     if ($objClause = $this->OrderByClause) {
         array_push($objClauses, $objClause);
     }
     // Add the LimitClause information, as well
     if ($objClause = $this->LimitClause) {
         array_push($objClauses, $objClause);
     }
     // Set the DataSource to be a Query result from Articlecore, given the clauses above
     $this->DataSource = Articlecore::LoadAll($objClauses);
 }
 /**
  * Refresh this MetaControl with Data from the local Articlemusic object.
  * @param boolean $blnReload reload Articlemusic from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objArticlemusic->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objArticlemusic->Id;
         }
     }
     if ($this->lstReferenceIDObject) {
         $this->lstReferenceIDObject->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstReferenceIDObject->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objReferenceIDObjectArray = Articlecore::LoadAll();
         if ($objReferenceIDObjectArray) {
             foreach ($objReferenceIDObjectArray as $objReferenceIDObject) {
                 $objListItem = new QListItem($objReferenceIDObject->__toString(), $objReferenceIDObject->Id);
                 if ($this->objArticlemusic->ReferenceIDObject && $this->objArticlemusic->ReferenceIDObject->Id == $objReferenceIDObject->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstReferenceIDObject->AddItem($objListItem);
             }
         }
     }
     if ($this->lblReferenceID) {
         $this->lblReferenceID->Text = $this->objArticlemusic->ReferenceIDObject ? $this->objArticlemusic->ReferenceIDObject->__toString() : null;
     }
     if ($this->txtArtist) {
         $this->txtArtist->Text = $this->objArticlemusic->Artist;
     }
     if ($this->lblArtist) {
         $this->lblArtist->Text = $this->objArticlemusic->Artist;
     }
     if ($this->txtLabel) {
         $this->txtLabel->Text = $this->objArticlemusic->Label;
     }
     if ($this->lblLabel) {
         $this->lblLabel->Text = $this->objArticlemusic->Label;
     }
     if ($this->txtNumberOfDiscs) {
         $this->txtNumberOfDiscs->Text = $this->objArticlemusic->NumberOfDiscs;
     }
     if ($this->lblNumberOfDiscs) {
         $this->lblNumberOfDiscs->Text = $this->objArticlemusic->NumberOfDiscs;
     }
     if ($this->calReleaseDate) {
         $this->calReleaseDate->DateTime = $this->objArticlemusic->ReleaseDate;
     }
     if ($this->lblReleaseDate) {
         $this->lblReleaseDate->Text = sprintf($this->objArticlemusic->ReleaseDate) ? $this->objArticlemusic->__toString($this->strReleaseDateDateTimeFormat) : null;
     }
 }