public function actionCrearNoprepago($idAtencion, $celular, $compania) { $model = new Noprepago(); $model->atencion_id = $idAtencion; $model->numero = $celular; $model->compania = $compania; $model->save(); }
public function actionAdmin() { $model = new Noprepago('search'); $model->unsetAttributes(); if (isset($_GET['Noprepago'])) { $model->setAttributes($_GET['Noprepago']); } $this->render('admin', array('model' => $model)); }
<?php $this->breadcrumbs = array(Noprepago::label(2), Yii::t('app', 'Index')); $this->menu = array(array('label' => Yii::t('app', 'Create') . ' ' . Noprepago::label(), 'url' => array('create')), array('label' => Yii::t('app', 'Manage') . ' ' . Noprepago::label(2), 'url' => array('admin'))); ?> <h1><?php echo GxHtml::encode(Noprepago::label(2)); ?> </h1> <?php $this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
echo $form->error($model, 'fecha'); ?> </div><!-- row --> <div class="row"> <?php echo $form->labelEx($model, 'comentario'); ?> <?php echo $form->textField($model, 'comentario'); ?> <?php echo $form->error($model, 'comentario'); ?> </div><!-- row --> <?php $this->widget('bootstrap.widgets.TbButtonGroup', array('type' => 'primary', 'toggle' => 'radio', 'buttons' => array(array('label' => 'LISTA'), array('label' => 'RECHAZO'), array('label' => 'RECHAZO NO PREPAGO')))); ?> <label><?php echo GxHtml::encode($model->getRelationLabel('noprepagos')); ?> </label> <?php echo $form->checkBoxList($model, 'noprepagos', GxHtml::encodeEx(GxHtml::listDataEx(Noprepago::model()->findAllAttributes(null, true)), false, true)); ?> <?php echo GxHtml::submitButton(Yii::t('app', 'Save')); $this->endWidget(); ?> </div><!-- form -->
public function comprobarNoPrepago($celular) { $flag = Noprepago::model()->exists('numero =:numero', array(':numero' => $celular)); return $flag; }