예제 #1
0




<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'control-activos-grid', 'dataProvider' => Controlactivos::model()->search_poractivo($canica), 'cssFile' => '/motoristas/css/grid/grilla_naranja.css', 'columns' => array('numformato', 'centro.nomcen', 'solicitante.ap', 'fecha', 'barcoanterior.nomep', 'barcoactual.nomep', 'comentario', 'estado.estado', array('class' => 'CButtonColumn', 'buttons' => array('view' => array('visible' => 'false'), 'update' => array('url' => '$this->grid->controller->createUrl("/controlactivos/update",
																					array("id"=>$data->idformato,																					      
																							)
																				)', 'label' => 'Actualizar'), 'delete' => array('visible' => 'false'))))));
예제 #2
0
 /**
  * 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 ControlActivos the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Controlactivos::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'El enlace o direccion solicitado no existe');
     }
     return $model;
 }