コード例 #1
0
ファイル: risikomap.php プロジェクト: quantrocket/planlogiq
 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->isPostBack && !$this->isCallback) {
         $SQL = "SELECT rcv_schaden, rcv_prio, rcv_ewk, idtm_rcvalue, MAX( rcv_cdate ) AS rcv_cdate FROM `tt_rcvalue` GROUP BY idtm_rcvalue ORDER BY rcv_prio ASC";
         $this->generateRiscMap(RCTTValueRecord::finder()->findAllBySQL($SQL), "Riskmap");
         $this->bindListRisc(RCTTValueRecord::finder()->findAllBySQL($SQL));
     }
 }
コード例 #2
0
 public function RCTTSavedButtonClicked($sender, $param)
 {
     $tempus = 'RCTTed' . $this->RCTTprimarykey;
     if ($this->RCTTedrcvalue_edit_status->Text == '1') {
         $RCTTEditRecord = RCTTValueRecord::finder()->findByPK($this->{$tempus}->Text);
     } else {
         $RCTTEditRecord = new RCTTValueRecord();
     }
     //HIDDEN
     foreach ($this->RCTThiddenfields as $recordfield) {
         $edrecordfield = 'RCTTed' . $recordfield;
         $RCTTEditRecord->{$recordfield} = $this->{$edrecordfield}->Value;
     }
     //DATUM
     foreach ($this->RCTTdatfields as $recordfield) {
         $edrecordfield = 'RCTTed' . $recordfield;
         $RCTTEditRecord->{$recordfield} = date('Y-m-d', $this->{$edrecordfield}->TimeStamp);
     }
     //BOOL
     foreach ($this->RCTTboolfields as $recordfield) {
         $edrecordfield = 'RCTTed' . $recordfield;
         $RCTTEditRecord->{$recordfield} = $this->{$edrecordfield}->Checked ? 1 : 0;
     }
     foreach ($this->RCTTfields as $recordfield) {
         $edrecordfield = 'RCTTed' . $recordfield;
         $RCTTEditRecord->{$recordfield} = $this->{$edrecordfield}->Text;
     }
     $RCTTEditRecord->save();
     $this->NETRCTTSavedButtonClicked($sender, $param);
 }