public function Save() { parent::Save(); if ($this->supporting_docs_links != null) { $this->supporting_docs_links->Save(); } }
protected function importAdditionalData($b, $blockNode) { if (isset($blockNode->data)) { foreach ($blockNode->data as $data) { if ($data['table'] != $this->getBlockTypeDatabaseTable()) { $table = (string) $data['table']; if (isset($data->record)) { foreach ($data->record as $record) { $aar = new ADODB_Active_Record($table); $aar->bID = $b->getBlockID(); foreach ($record->children() as $node) { $nodeName = $node->getName(); $aar->{$nodeName} = (string) $node; } if ($table == 'btFormQuestions') { $db = Loader::db(); $aar->questionSetId = $db->GetOne('select questionSetId from btForm where bID = ?', array($b->getBlockID())); $aar->qID = null; } $aar->Save(); } } } } } }
function Save() { // Agregar el generador a la llave primaria en insercion // el generador debe llamarse GEN_(Campo PK) if (App::$base->driver == 'firebird') { $ids = $this->DB()->MetaPrimaryKeys($this->_table); // PK $id = count($ids) > 0 ? $ids[0] : ''; if (!$this->_saved && $id != '') { $id = strtolower($id); $gen = 'GEN_' . strtoupper($id); $this->{$id} = $this->DB()->GenID($gen); } } if (App::$base->driver == 'postgres' || App::$base->driver == 'postgres8') { $ids = $this->DB()->MetaPrimaryKeys($this->_table); // PK $id = count($ids) > 0 ? $ids[0] : ''; if (!$this->_saved && $id != '') { $gen = $this->_table . '_' . $id . '_seq'; //formato: tbl_nombretabla_id_campoid_seq $gen = strtolower($gen); $this->{$id} = $this->DB()->GenID($gen); } } parent::Save(); return $this; }
public function Save() { $saveType = $this->getSaveType(); parent::Save(); if ($this->supporting_docs_meta != null) { $this->supporting_docs_meta->Save(); Log::saveLogDetails($this->_table, $this->doc_id, $saveType); } }
public function Save() { if ($this->entity_name != null && $this->entity_id != null) { echo 'management:Save - no entity_name or entity_id defined'; return false; } else { parent::Save(); } }
public function Save() { if ($this->clari_notes_record_number != null) { $this->Load("clari_notes_record_number = '{$this->clari_notes_record_number}'"); } else { $this->clari_notes_record_number = shn_create_uuid('clari_notes'); parent::Save(); } }
protected function importAdditionalData($b, $blockNode) { if (isset($blockNode->data)) { foreach ($blockNode->data as $data) { if (strtoupper($data['table']) != strtoupper($this->getBlockTypeDatabaseTable())) { $table = (string) $data['table']; if (isset($data->record)) { foreach ($data->record as $record) { $aar = new ADODB_Active_Record($table); $aar->bID = $b->getBlockID(); foreach ($record->children() as $node) { $nodeName = $node->getName(); $aar->{$nodeName} = ContentImporter::getValue((string) $node); } $aar->Save(); } } } } } }
public function Save() { parent::Save(); }
public function Save() { $saveType = $this->getSaveType(); parent::Save(); Log::saveLogDetails($this->_table, $this->doc_id, $saveType); }
public function Save() { $ok = parent::Save(); if (!$ok) { $err = $this->ErrorMsg(); throw new DbException($err); } }
public function Save() { $ok = parent::Save(); if (!$ok) { $err = $this->ErrorMsg(); echo $err; //throw new ADODB_Exception();// Exception($err); // should remove exception and add error handling routines } //Save UserProfile if ($this->user_profile != null) { $this->user_profile->username = $this->username; $ok = $this->user_profile->Save(); if (!$ok) { $err = $this->ErrorMsg(); echo $err; //throw new ADODB_Exception();// Exception($err); // should remove exception and add error handling routines } } //Save UserCodes if ($this->user_code != null) { $this->user_code->username = $this->username; $ok = $this->user_code->Save(); if (!$ok) { $err = $this->ErrorMsg(); echo $err; //throw new ADODB_Exception();// Exception($err); // should remove exception and add error handling routines } } if ($err == null) { return true; } }