public function getDelete($id)
 {
     $pendidikan = Pendidikan::find($id);
     if ($pendidikan->delete()) {
         return Redirect::to('pendidikan')->with('succes', 'Anda Berhasi Menghapus data Pendidikan');
     } else {
         return Redirect::to('pendidikan')->with('error', 'Anda gagal menghapus data ini');
     }
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //
     $pendidikan = Pendidikan::find($id);
     if ($pendidikan->delete()) {
         return Response::json(array('success' => TRUE));
     }
 }
Beispiel #3
0
 public function searchAll($params)
 {
     $query = Pendidikan::find()->JoinWith('emp', true, 'INNER JOIN')->JoinWith('user', true, 'INNER JOIN');
     //->Where(['a0001.EMP_ID'=>'LG.0005']);
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     return $dataProvider;
 }
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Pendidikan the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Pendidikan::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Beispiel #5
0
 public function getPen()
 {
     return $this->hasOne(Pendidikan::className(), ['EMP_ID' => 'EMP_ID']);
     //return $this->hasMany(Pendidikan::className(), ['EMP_ID' => 'EMP_ID']);
 }
Beispiel #6
0
?>

	<?php 
echo $form->textFieldGroup($model, 'nm_anggota', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 30))));
?>

	<?php 
echo $form->textAreaGroup($model, 'alamat', array('widgetOptions' => array('htmlOptions' => array('rows' => 6, 'cols' => 50, 'class' => 'span8'))));
?>

	<?php 
echo $form->datePickerGroup($model, 'tgl_lahir', array('widgetOptions' => array('options' => array('format' => 'yyyy-mm-dd'), 'htmlOptions' => array('class' => 'span5')), 'prepend' => '<i class="glyphicon glyphicon-calendar"></i>', 'append' => 'Click on Month/Year to select a different Month/Year.'));
?>

	<?php 
echo $form->dropDownListGroup($model, 'pendidikan', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 20), 'data' => CHtml::listData(Pendidikan::model()->findAll(), 'nama', 'nama'))));
?>

	<?php 
echo $form->dropDownListGroup($model, 'kompetensi_keahlian', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 30), 'data' => CHtml::listData(kompetensikeahlian::model()->findAll(), 'kompetensi', 'kompetensi'))));
?>

	<?php 
echo $form->textFieldGroup($model, 'username', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 20))));
?>

	<?php 
echo $form->passwordFieldGroup($model, 'password', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 20))));
?>

	<?php