public static function getDescripcionMotivo($_Id)
 {
     $laDescripcion = '';
     $criteria = new CDbCriteria();
     $criteria->select = 'DescripcionMotivoBloqueo';
     // seleccionar solo la columna 'title'
     $criteria->condition = 'IdMotivoBloqueo=:Id';
     $criteria->params = array(':Id' => $_Id);
     $elMotivoBloqueo = MotivosBloqueoFecha::model()->find($criteria);
     // $params no es necesario
     if ($elMotivoBloqueo != null) {
         $laDescripcion = $elMotivoBloqueo->Nombre;
     }
     return $laDescripcion;
 }
Пример #2
0
             <div class="col-md-2">
                 <?php 
 echo $form->labelEx($model, 'HoraFinal');
 ?>
                 <?php 
 $this->widget('yiiwheels.widgets.timepicker.WhTimePicker', array('model' => $model, 'attribute' => 'HoraFinal', 'pluginOptions' => array('showSeconds' => false, 'showMeridian' => false, 'defaultTime' => '00:00'), 'htmlOptions' => array('class' => 'form-control')));
 ?>
                 <?php 
 echo $form->error($model, 'HoraFinal');
 ?>
             
                 
             </div>
             
             <?php 
 $listamotivos = MotivosBloqueoFecha::listData();
 ?>
             
             <div class="col-md-2">
                 <?php 
 echo $form->labelEx($model, 'IdMotivoBloqueo');
 ?>
                 <?php 
 echo $form->dropDownList($model, 'IdMotivoBloqueo', $listamotivos, array('class' => 'form-control', 'prompt' => 'Seleccionar Motivo ... '));
 ?>
                 <?php 
 echo $form->error($model, 'IdMotivoBloqueo');
 ?>
             
             </div>    
             
Пример #3
0
<?php

/* @var $this MuellesController */
/* @var $dataProvider CActiveDataProvider */
//$this->menu=$this->verPermisosMenuOperaciones();
?>


<div class="panel panel-primary">
    <div class="panel-heading">        
        <h3 class="panel-title">Fechas Bloqueadas</h3>
    </div>
<div class=" panel-body">


<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'fechasbloqueadas-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'htmlOptions' => array('style' => 'word-wrap:break-word;'), 'columns' => array(array('name' => 'IdFechaBloqueada', 'htmlOptions' => array('width' => '50')), array('name' => 'Fecha', 'htmlOptions' => array('width' => '100')), 'IdCedi' => array('name' => 'IdCedi', 'htmlOptions' => array('width' => '200'), 'value' => '$data->cedi->NombreCEDI', 'filter' => CHtml::listData(Cedi::model()->findAll(array('order' => 'NombreCEDI')), 'IDCEDI', 'NombreCEDI')), array('name' => 'HoraInicio', 'htmlOptions' => array('width' => '150')), array('name' => 'HoraFinal', 'htmlOptions' => array('width' => '150')), 'IdMotivoBloqueo' => array('name' => 'IdMotivoBloqueo', 'htmlOptions' => array('width' => '200'), 'value' => '$data->motivobloqueo->DescripcionMotivoBloqueo', 'filter' => CHtml::listData(MotivosBloqueoFecha::model()->findAll(array('order' => 'DescripcionMotivoBloqueo')), 'IdMotivoBloqueo', 'DescripcionMotivoBloqueo')), array('name' => 'ObservacionesBloqueo', 'htmlOptions' => array('width' => '400')))));
?>
</div>
</div>
 /**
  * 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 MotivosBloqueoFecha the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = MotivosBloqueoFecha::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }