protected function Form_Create() { // Use the CreateFromPathInfo shortcut (this can also be done manually using the AssetsauditlogMetaControl constructor) // MAKE SURE we specify "$this" as the MetaControl's (and thus all subsequent controls') parent $this->mctAssetsauditlog = AssetsauditlogMetaControl::CreateFromPathInfo($this); // Call MetaControl's methods to create qcontrols based on Assetsauditlog's data fields $this->lblId = $this->mctAssetsauditlog->lblId_Create(); $this->txtAsin = $this->mctAssetsauditlog->txtAsin_Create(); $this->txtEmail = $this->mctAssetsauditlog->txtEmail_Create(); $this->calTakenDate = $this->mctAssetsauditlog->calTakenDate_Create(); $this->calActualReturnDate = $this->mctAssetsauditlog->calActualReturnDate_Create(); $this->calRealReturnDate = $this->mctAssetsauditlog->calRealReturnDate_Create(); $this->txtFullName = $this->mctAssetsauditlog->txtFullName_Create(); // Create Buttons and Actions on this Form $this->btnSave = new QButton($this); $this->btnSave->Text = QApplication::Translate('Save'); $this->btnSave->AddAction(new QClickEvent(), new QAjaxAction('btnSave_Click')); $this->btnSave->CausesValidation = true; $this->btnCancel = new QButton($this); $this->btnCancel->Text = QApplication::Translate('Cancel'); $this->btnCancel->AddAction(new QClickEvent(), new QAjaxAction('btnCancel_Click')); $this->btnDelete = new QButton($this); $this->btnDelete->Text = QApplication::Translate('Delete'); $this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction(QApplication::Translate('Are you SURE you want to DELETE this') . ' ' . QApplication::Translate('Assetsauditlog') . '?')); $this->btnDelete->AddAction(new QClickEvent(), new QAjaxAction('btnDelete_Click')); $this->btnDelete->Visible = $this->mctAssetsauditlog->EditMode; }