/** * Refresh this MetaControl with Data from the local NarroContext object. * @param boolean $blnReload reload NarroContext from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objNarroContext->Reload(); } if ($this->lblContextId) { if ($this->blnEditMode) { $this->lblContextId->Text = $this->objNarroContext->ContextId; } } if ($this->lstText) { $this->lstText->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstText->AddItem(QApplication::Translate('- Select One -'), null); } $objTextArray = NarroText::LoadAll(); if ($objTextArray) { foreach ($objTextArray as $objText) { $objListItem = new QListItem($objText->__toString(), $objText->TextId); if ($this->objNarroContext->Text && $this->objNarroContext->Text->TextId == $objText->TextId) { $objListItem->Selected = true; } $this->lstText->AddItem($objListItem); } } } if ($this->lblTextId) { $this->lblTextId->Text = $this->objNarroContext->Text ? $this->objNarroContext->Text->__toString() : null; } if ($this->txtTextAccessKey) { $this->txtTextAccessKey->Text = $this->objNarroContext->TextAccessKey; } if ($this->lblTextAccessKey) { $this->lblTextAccessKey->Text = $this->objNarroContext->TextAccessKey; } if ($this->txtTextCommandKey) { $this->txtTextCommandKey->Text = $this->objNarroContext->TextCommandKey; } if ($this->lblTextCommandKey) { $this->lblTextCommandKey->Text = $this->objNarroContext->TextCommandKey; } if ($this->lstProject) { $this->lstProject->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstProject->AddItem(QApplication::Translate('- Select One -'), null); } $objProjectArray = NarroProject::LoadAll(); if ($objProjectArray) { foreach ($objProjectArray as $objProject) { $objListItem = new QListItem($objProject->__toString(), $objProject->ProjectId); if ($this->objNarroContext->Project && $this->objNarroContext->Project->ProjectId == $objProject->ProjectId) { $objListItem->Selected = true; } $this->lstProject->AddItem($objListItem); } } } if ($this->lblProjectId) { $this->lblProjectId->Text = $this->objNarroContext->Project ? $this->objNarroContext->Project->__toString() : null; } if ($this->txtContext) { $this->txtContext->Text = $this->objNarroContext->Context; } if ($this->lblContext) { $this->lblContext->Text = $this->objNarroContext->Context; } if ($this->txtContextMd5) { $this->txtContextMd5->Text = $this->objNarroContext->ContextMd5; } if ($this->lblContextMd5) { $this->lblContextMd5->Text = $this->objNarroContext->ContextMd5; } if ($this->txtComment) { $this->txtComment->Text = $this->objNarroContext->Comment; } if ($this->lblComment) { $this->lblComment->Text = $this->objNarroContext->Comment; } if ($this->txtCommentMd5) { $this->txtCommentMd5->Text = $this->objNarroContext->CommentMd5; } if ($this->lblCommentMd5) { $this->lblCommentMd5->Text = $this->objNarroContext->CommentMd5; } if ($this->lstFile) { $this->lstFile->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstFile->AddItem(QApplication::Translate('- Select One -'), null); } $objFileArray = NarroFile::LoadAll(); if ($objFileArray) { foreach ($objFileArray as $objFile) { $objListItem = new QListItem($objFile->__toString(), $objFile->FileId); if ($this->objNarroContext->File && $this->objNarroContext->File->FileId == $objFile->FileId) { $objListItem->Selected = true; } $this->lstFile->AddItem($objListItem); } } } if ($this->lblFileId) { $this->lblFileId->Text = $this->objNarroContext->File ? $this->objNarroContext->File->__toString() : null; } if ($this->calCreated) { $this->calCreated->DateTime = $this->objNarroContext->Created; } if ($this->lblCreated) { $this->lblCreated->Text = sprintf($this->objNarroContext->Created) ? $this->objNarroContext->Created->qFormat($this->strCreatedDateTimeFormat) : null; } if ($this->calModified) { $this->calModified->DateTime = $this->objNarroContext->Modified; } if ($this->lblModified) { $this->lblModified->Text = sprintf($this->objNarroContext->Modified) ? $this->objNarroContext->Modified->qFormat($this->strModifiedDateTimeFormat) : null; } if ($this->chkActive) { $this->chkActive->Checked = $this->objNarroContext->Active; } if ($this->lblActive) { $this->lblActive->Text = $this->objNarroContext->Active ? QApplication::Translate('Yes') : QApplication::Translate('No'); } }
/** * Refresh this MetaControl with Data from the local NarroFileProgress object. * @param boolean $blnReload reload NarroFileProgress from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objNarroFileProgress->Reload(); } if ($this->lblFileProgressId) { if ($this->blnEditMode) { $this->lblFileProgressId->Text = $this->objNarroFileProgress->FileProgressId; } } if ($this->lstFile) { $this->lstFile->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstFile->AddItem(QApplication::Translate('- Select One -'), null); } $objFileArray = NarroFile::LoadAll(); if ($objFileArray) { foreach ($objFileArray as $objFile) { $objListItem = new QListItem($objFile->__toString(), $objFile->FileId); if ($this->objNarroFileProgress->File && $this->objNarroFileProgress->File->FileId == $objFile->FileId) { $objListItem->Selected = true; } $this->lstFile->AddItem($objListItem); } } } if ($this->lblFileId) { $this->lblFileId->Text = $this->objNarroFileProgress->File ? $this->objNarroFileProgress->File->__toString() : null; } if ($this->lstLanguage) { $this->lstLanguage->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstLanguage->AddItem(QApplication::Translate('- Select One -'), null); } $objLanguageArray = NarroLanguage::LoadAll(); if ($objLanguageArray) { foreach ($objLanguageArray as $objLanguage) { $objListItem = new QListItem($objLanguage->__toString(), $objLanguage->LanguageId); if ($this->objNarroFileProgress->Language && $this->objNarroFileProgress->Language->LanguageId == $objLanguage->LanguageId) { $objListItem->Selected = true; } $this->lstLanguage->AddItem($objListItem); } } } if ($this->lblLanguageId) { $this->lblLanguageId->Text = $this->objNarroFileProgress->Language ? $this->objNarroFileProgress->Language->__toString() : null; } if ($this->txtFileMd5) { $this->txtFileMd5->Text = $this->objNarroFileProgress->FileMd5; } if ($this->lblFileMd5) { $this->lblFileMd5->Text = $this->objNarroFileProgress->FileMd5; } if ($this->txtHeader) { $this->txtHeader->Text = $this->objNarroFileProgress->Header; } if ($this->lblHeader) { $this->lblHeader->Text = $this->objNarroFileProgress->Header; } if ($this->txtTotalTextCount) { $this->txtTotalTextCount->Text = $this->objNarroFileProgress->TotalTextCount; } if ($this->lblTotalTextCount) { $this->lblTotalTextCount->Text = $this->objNarroFileProgress->TotalTextCount; } if ($this->txtApprovedTextCount) { $this->txtApprovedTextCount->Text = $this->objNarroFileProgress->ApprovedTextCount; } if ($this->lblApprovedTextCount) { $this->lblApprovedTextCount->Text = $this->objNarroFileProgress->ApprovedTextCount; } if ($this->txtFuzzyTextCount) { $this->txtFuzzyTextCount->Text = $this->objNarroFileProgress->FuzzyTextCount; } if ($this->lblFuzzyTextCount) { $this->lblFuzzyTextCount->Text = $this->objNarroFileProgress->FuzzyTextCount; } if ($this->txtProgressPercent) { $this->txtProgressPercent->Text = $this->objNarroFileProgress->ProgressPercent; } if ($this->lblProgressPercent) { $this->lblProgressPercent->Text = $this->objNarroFileProgress->ProgressPercent; } if ($this->chkExport) { $this->chkExport->Checked = $this->objNarroFileProgress->Export; } if ($this->lblExport) { $this->lblExport->Text = $this->objNarroFileProgress->Export ? QApplication::Translate('Yes') : QApplication::Translate('No'); } }
/** * Refresh this MetaControl with Data from the local NarroFile object. * @param boolean $blnReload reload NarroFile from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objNarroFile->Reload(); } if ($this->lblFileId) { if ($this->blnEditMode) { $this->lblFileId->Text = $this->objNarroFile->FileId; } } if ($this->txtFileName) { $this->txtFileName->Text = $this->objNarroFile->FileName; } if ($this->lblFileName) { $this->lblFileName->Text = $this->objNarroFile->FileName; } if ($this->txtFilePath) { $this->txtFilePath->Text = $this->objNarroFile->FilePath; } if ($this->lblFilePath) { $this->lblFilePath->Text = $this->objNarroFile->FilePath; } if ($this->txtFileMd5) { $this->txtFileMd5->Text = $this->objNarroFile->FileMd5; } if ($this->lblFileMd5) { $this->lblFileMd5->Text = $this->objNarroFile->FileMd5; } if ($this->lstParent) { $this->lstParent->RemoveAllItems(); $this->lstParent->AddItem(QApplication::Translate('- Select One -'), null); $objParentArray = NarroFile::LoadAll(); if ($objParentArray) { foreach ($objParentArray as $objParent) { $objListItem = new QListItem($objParent->__toString(), $objParent->FileId); if ($this->objNarroFile->Parent && $this->objNarroFile->Parent->FileId == $objParent->FileId) { $objListItem->Selected = true; } $this->lstParent->AddItem($objListItem); } } } if ($this->lblParentId) { $this->lblParentId->Text = $this->objNarroFile->Parent ? $this->objNarroFile->Parent->__toString() : null; } if ($this->lstType) { $this->lstType->SelectedValue = $this->objNarroFile->TypeId; } if ($this->lblTypeId) { $this->lblTypeId->Text = $this->objNarroFile->TypeId ? NarroFileType::$NameArray[$this->objNarroFile->TypeId] : null; } if ($this->lstProject) { $this->lstProject->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstProject->AddItem(QApplication::Translate('- Select One -'), null); } $objProjectArray = NarroProject::LoadAll(); if ($objProjectArray) { foreach ($objProjectArray as $objProject) { $objListItem = new QListItem($objProject->__toString(), $objProject->ProjectId); if ($this->objNarroFile->Project && $this->objNarroFile->Project->ProjectId == $objProject->ProjectId) { $objListItem->Selected = true; } $this->lstProject->AddItem($objListItem); } } } if ($this->lblProjectId) { $this->lblProjectId->Text = $this->objNarroFile->Project ? $this->objNarroFile->Project->__toString() : null; } if ($this->chkActive) { $this->chkActive->Checked = $this->objNarroFile->Active; } if ($this->lblActive) { $this->lblActive->Text = $this->objNarroFile->Active ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->calCreated) { $this->calCreated->DateTime = $this->objNarroFile->Created; } if ($this->lblCreated) { $this->lblCreated->Text = sprintf($this->objNarroFile->Created) ? $this->objNarroFile->Created->qFormat($this->strCreatedDateTimeFormat) : null; } if ($this->calModified) { $this->calModified->DateTime = $this->objNarroFile->Modified; } if ($this->lblModified) { $this->lblModified->Text = sprintf($this->objNarroFile->Modified) ? $this->objNarroFile->Modified->qFormat($this->strModifiedDateTimeFormat) : null; } if ($this->txtHeader) { $this->txtHeader->Text = $this->objNarroFile->Header; } if ($this->lblHeader) { $this->lblHeader->Text = $this->objNarroFile->Header; } }