コード例 #1
0
 public function Save()
 {
     parent::Save();
     if ($this->supporting_docs_links != null) {
         $this->supporting_docs_links->Save();
     }
 }
コード例 #2
0
ファイル: form.php プロジェクト: ojalehto/concrete5-legacy
 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();
                     }
                 }
             }
         }
     }
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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);
     }
 }
コード例 #5
0
ファイル: Management.php プロジェクト: GeraldScott/OpenEvSys
 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();
     }
 }
コード例 #6
0
ファイル: ClariNotes.php プロジェクト: GeraldScott/OpenEvSys
 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();
     }
 }
コード例 #7
0
 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();
                     }
                 }
             }
         }
     }
 }
コード例 #8
0
ファイル: Geometry.php プロジェクト: GeraldScott/OpenEvSys
 public function Save()
 {
     parent::Save();
 }
コード例 #9
0
 public function Save()
 {
     $saveType = $this->getSaveType();
     parent::Save();
     Log::saveLogDetails($this->_table, $this->doc_id, $saveType);
 }
コード例 #10
0
ファイル: UserProfile.php プロジェクト: GeraldScott/OpenEvSys
 public function Save()
 {
     $ok = parent::Save();
     if (!$ok) {
         $err = $this->ErrorMsg();
         throw new DbException($err);
     }
 }
コード例 #11
0
ファイル: User.php プロジェクト: GeraldScott/OpenEvSys
 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;
     }
 }