public function actionCreate() { $model = new Parametroimportacion(); if (isset($_POST['Parametroimportacion'])) { $model->setAttributes($_POST['Parametroimportacion']); try { if ($model->save()) { $this->setFlash('notice', array('title' => 'Mensaje', 'content' => 'Se grabó correctamente.')); $this->redirect(array('manage')); } } catch (Exception $e) { $model->addError('', $e->getMessage()); } } elseif (isset($_GET['Parametroimportacion'])) { $model->attributes = $_GET['Parametroimportacion']; } $this->render('create', array('model' => $model)); }