/** * Manages all models. */ public function actionIndex() { $this->tituloManual = "Lista de clientes"; $model = new Cliente('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Cliente'])) { $model->attributes = $_GET['Cliente']; } $this->render('index', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { $model = new Cliente('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Cliente'])) { $model->attributes = $_GET['Cliente']; } $this->render('admin', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { $model = new Cliente('search'); $model->unsetAttributes(); $oSearchForm = new SearchForm(); if (!empty($_GET['Cliente'])) { $model->attributes = $_GET['Cliente']; $oSearchForm->request = $_GET['Cliente']; } $headers = $model->getHeadersRelatorio(); $this->exportarRelatorio($model->search(), 'Relatório Clientes - ', $headers, date('YmdHis') . '_relatorio_clientes.csv'); $this->render('admin', array('model' => $model, 'exibeFormularioBusca' => $oSearchForm->checaRequisicaoVazia())); }