protected function SetupClassProperty()
 {
     // Lookup Object PK information from Query String (if applicable)
     // Set mode to Edit or New depending on what's found
     $intId = QApplication::QueryString('intId');
     if ($intId) {
         $this->objClassProperty = ClassProperty::Load($intId);
         if (!$this->objClassProperty) {
             throw new Exception('Could not find a ClassProperty object with PK arguments: ' . $intId);
         }
         $this->strTitleVerb = QApplication::Translate('Edit');
         $this->blnEditMode = true;
     } else {
         $this->objClassProperty = new ClassProperty();
         $this->strTitleVerb = QApplication::Translate('Create');
         $this->blnEditMode = false;
     }
 }
 protected function UpdateVariableFields()
 {
     $this->objVariable->Name = $this->txtName->Text;
     $this->objVariable->VariableTypeId = $this->lstVariableType->SelectedValue;
     $this->objVariable->ObjectTypeId = $this->lstObjectType->SelectedValue;
     $this->objVariable->ArrayFlag = $this->chkArrayFlag->Checked;
     $this->objVariable->DefaultValue = $this->txtDefaultValue->Text;
     $this->objVariable->FirstVersion = $this->txtFirstVersion->Text;
     $this->objVariable->LastVersion = $this->txtLastVersion->Text;
     $this->objVariable->ShortDescription = $this->txtShortDescription->Text;
     $this->objVariable->ExtendedDescription = $this->txtExtendedDescription->Text;
     $this->objVariable->ClassProperty = ClassProperty::Load($this->lstClassProperty->SelectedValue);
     $this->objVariable->ClassVariable = ClassVariable::Load($this->lstClassVariable->SelectedValue);
     $this->objVariable->Parameter = Parameter::Load($this->lstParameter->SelectedValue);
     $this->objVariable->QcodoConstant = QcodoConstant::Load($this->lstQcodoConstant->SelectedValue);
 }
 public function btnEdit_Click($strFormId, $strControlId, $strParameter)
 {
     $strParameterArray = explode(',', $strParameter);
     $objClassProperty = ClassProperty::Load($strParameterArray[0]);
     $objEditPanel = new ClassPropertyEditPanel($this, $this->strCloseEditPanelMethod, $objClassProperty);
     $strMethodName = $this->strSetEditPanelMethod;
     $this->objForm->{$strMethodName}($objEditPanel);
 }
Beispiel #4
0
 protected function Redirect()
 {
     $objProperty = ClassProperty::Load(QApplication::PathInfo(0));
     if ($objProperty) {
         QApplication::Redirect('/index.php/' . $this->objProperty->QcodoClass->Name . '/Properties');
     } else {
         QApplication::Redirect('/index.php');
     }
 }