protected function Form_Create() { $this->mctFund = StewardshipFundMetaControl::CreateFromPathInfo($this); $this->txtName = $this->mctFund->txtName_Create(); $this->txtName->Required = true; $this->txtExternalName = $this->mctFund->txtExternalName_Create(); $this->txtAccountNumber = $this->mctFund->txtAccountNumber_Create(); $this->txtFundNumber = $this->mctFund->txtFundNumber_Create(); $this->chkActiveFlag = $this->mctFund->chkActiveFlag_Create(); $this->chkExternalFlag = $this->mctFund->chkExternalFlag_Create(); $this->btnSave = new QButton($this); $this->btnSave->CssClass = 'primary'; $this->btnSave->Text = $this->mctFund->EditMode ? 'Update' : 'Create'; $this->btnSave->AddAction(new QClickEvent(), new QAjaxAction('btnSave_Click')); $this->btnSave->CausesValidation = true; $this->btnCancel = new QLinkButton($this); $this->btnCancel->CssClass = 'cancel'; $this->btnCancel->Text = QApplication::Translate('Cancel'); $this->btnCancel->AddAction(new QClickEvent(), new QAjaxAction('btnCancel_Click')); $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction()); }
/** * Static Helper Method to Create using QueryString arguments * * @param mixed $objParentObject QForm or QPanel which will be using this StewardshipFundMetaControl * @param QMetaControlCreateType $intCreateType rules governing StewardshipFund object creation - defaults to CreateOrEdit * @return StewardshipFundMetaControl */ public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) { $intId = QApplication::QueryString('intId'); return StewardshipFundMetaControl::Create($objParentObject, $intId, $intCreateType); }