/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. */ public function actionCreate() { $model = new Ruangan(); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if (isset($_POST['Ruangan'])) { $model->attributes = $_POST['Ruangan']; if ($model->save()) { $this->redirect(array('view', 'id' => $model->idruang)); } } $this->render('create', array('model' => $model)); }
/** * @param string * @param string * @param string * @param int * @param string * @param string * @param string * @param string * @param string * @param string * @return string the result * @soap */ public function insertNewRuangan($ID, $ShortName, $Name, $Kapasitas, $Ket, $Status, $LastUpdate, $UserID, $Ws, $RFID) { $model = new Ruangan(); $model->ID = $ID; $model->SHORT_NAME = $ShortName; $model->NAME = $Name; $model->KAPASITAS = $Kapasitas; $model->KET = $Ket; $model->STATUS = $Status; $model->LAST_UPDATE = $LastUpdate; $model->USER_ID = $UserID; $model->WS = $Ws; $model->RFID = $RFID; if ($model->save()) { return "Data berhasil di tambahkan !"; } else { return "Data gagal di tambahkan !"; } }