예제 #1
0
 public function fetchData()
 {
     $result = parent::fetchData();
     $prtFormName = Openbiz::getObject($this->parentFormName)->parentFormName;
     if ($prtFormName == 'account.form.AccountEditShippingAddressForm' || $prtFormName == 'account.form.AccountEditBillingAddressForm') {
         $account_id = Openbiz::getObject(Openbiz::getObject($this->parentFormName)->parentFormName)->recordId;
         $result['account_id'] = $account_id;
         $productRec = Openbiz::getObject("account.do.AccountPickDO")->fetchById($account_id);
         $result['account_name'] = $productRec['name'];
     }
     return $result;
 }
 public function fetchData()
 {
     $this->activeRecord = null;
     $result = parent::fetchData();
     $lang = Openbiz::$app->getClientProxy()->getFormInputs("fld_lang");
     $lang ? $lang : ($lang = I18n::getCurrentLangCode());
     $record_id = $result["Id"];
     $transDO = Openbiz::getObject($this->translateDO, 1);
     $currentRecord = $transDO->fetchOne("[{$this->recordFKField}]='{$record_id}' AND [lang]='{$lang}'");
     if ($currentRecord) {
         $currentRecord = $currentRecord->toArray();
         foreach ($currentRecord as $field => $value) {
             $result['_' . $field] = $value;
         }
     } else {
         $result['_name'] = "";
         $result['_description'] = "";
     }
     return $result;
 }
예제 #3
0
 protected function _doUpdate($inputRecord, $currentRecord)
 {
     $this->processOptions($inputRecord['options'], $currentRecord['Id']);
     return parent::_doUpdate($inputRecord, $currentRecord);
 }
예제 #4
0
 public function close()
 {
     $parentForm = Openbiz::getObject($this->parentFormName);
     $parentForm->rerender();
     return parent::close();
 }