Commit e4f49038 authored by JULIO JARAMILLO's avatar JULIO JARAMILLO

subida arreglo eventos

parent f25ac9a2
...@@ -20,7 +20,7 @@ class MzgteventosController extends GxController { ...@@ -20,7 +20,7 @@ class MzgteventosController extends GxController {
$model->setAttributes($_POST['Mzgteventos']); $model->setAttributes($_POST['Mzgteventos']);
$model->MZGTEVENTOS_FECHAREGISTRO = date('Y-m-d H:i:s'); $model->MZGTEVENTOS_FECHAREGISTRO = date('Y-m-d H:i:s');
$model->FK5_MZGTEVENTOS_INV_MZGTPERSONAS_PK = $name;
if ($model->save()) { if ($model->save()) {
if (Yii::app()->getRequest()->getIsAjaxRequest()) if (Yii::app()->getRequest()->getIsAjaxRequest())
...@@ -70,7 +70,7 @@ class MzgteventosController extends GxController { ...@@ -70,7 +70,7 @@ class MzgteventosController extends GxController {
$dataProvider = new CActiveDataProvider('Mzgteventos',array( $dataProvider = new CActiveDataProvider('Mzgteventos',array(
'criteria'=>array( 'criteria'=>array(
'condition'=>'FK5_MZGTEVENTOS_INV_MZGTPERSONAS_PK = '.$id,
'order'=>'MZGTEVENTOS_FECHAREGISTRO DESC', 'order'=>'MZGTEVENTOS_FECHAREGISTRO DESC',
))); )));
$this->render('index', array( $this->render('index', array(
...@@ -86,7 +86,7 @@ class MzgteventosController extends GxController { ...@@ -86,7 +86,7 @@ class MzgteventosController extends GxController {
if (isset($_GET['Mzgteventos'])) if (isset($_GET['Mzgteventos']))
$model->setAttributes($_GET['Mzgteventos']); $model->setAttributes($_GET['Mzgteventos']);
$model->FK5_MZGTEVENTOS_INV_MZGTPERSONAS_PK = $id;
$this->render('admin', array( $this->render('admin', array(
'model' => $model, 'model' => $model,
......
<?php
class MzgtpersonasController extends GxController {
public function actionView($id) {
$this->render('view', array(
'model' => $this->loadModel($id, 'Mzgtpersonas'),
));
}
public function actionCreate() {
$model = new Mzgtpersonas;
if (isset($_POST['Mzgtpersonas'])) {
$model->setAttributes($_POST['Mzgtpersonas']);
if ($model->save()) {
if (Yii::app()->getRequest()->getIsAjaxRequest())
Yii::app()->end();
else
$this->redirect(array('view', 'id' => $model->PK_MZGTPERSONAS));
}
}
$this->render('create', array( 'model' => $model));
}
public function actionUpdate($id) {
$model = $this->loadModel($id, 'Mzgtpersonas');
if (isset($_POST['Mzgtpersonas'])) {
$model->setAttributes($_POST['Mzgtpersonas']);
if ($model->save()) {
$this->redirect(array('view', 'id' => $model->PK_MZGTPERSONAS));
}
}
$this->render('update', array(
'model' => $model,
));
}
public function actionDelete($id) {
if (Yii::app()->getRequest()->getIsPostRequest()) {
$this->loadModel($id, 'Mzgtpersonas')->delete();
if (!Yii::app()->getRequest()->getIsAjaxRequest())
$this->redirect(array('admin'));
} else
throw new CHttpException(400, Yii::t('app', 'Your request is invalid.'));
}
public function actionIndex() {
$dataProvider = new CActiveDataProvider('Mzgtpersonas');
$this->render('index', array(
'dataProvider' => $dataProvider,
));
}
public function actionAdmin() {
$model = new Mzgtpersonas('search');
$model->unsetAttributes();
if (isset($_GET['Mzgtpersonas']))
$model->setAttributes($_GET['Mzgtpersonas']);
$this->render('admin', array(
'model' => $model,
));
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
<?php echo $form->textField($model, 'MZGTBANCOAUTORES_CEDULA', array('maxlength' => 255)); ?> <?php echo $form->textField($model, 'MZGTBANCOAUTORES_CEDULA', array('maxlength' => 255)); ?>
<?php echo $form->error($model,'MZGTBANCOAUTORES_CEDULA'); ?> <?php echo $form->error($model,'MZGTBANCOAUTORES_CEDULA'); ?>
</div><!-- row --> </div><!-- row -->
<div class="row">
<?php echo $form->labelEx($model,'FK1_MZGTBANCOAUTORES_MZGTTIPOAUTORES_PK'); ?> <?php echo $form->labelEx($model,'FK1_MZGTBANCOAUTORES_MZGTTIPOAUTORES_PK'); ?>
</div><!-- row --> </div><!-- row -->
......
...@@ -100,10 +100,7 @@ ...@@ -100,10 +100,7 @@
<?php echo $form->error($model,'FK4_MZGTEVENTOS_INV_MZGTPROYECTOS_PK'); ?> <?php echo $form->error($model,'FK4_MZGTEVENTOS_INV_MZGTPROYECTOS_PK'); ?>
</div><!-- row --> </div><!-- row -->
<!-- <!--
<div class="row">
<?php echo $form->labelEx($model,'FK5_MZGTEVENTOS_INV_MZGTPERSONAS_PK'); ?>
<?php echo $form->dropDownList($model, 'FK5_MZGTEVENTOS_INV_MZGTPERSONAS_PK', GxHtml::listDataEx(Mzgtpersonas::model()->findAllAttributes(null, true))); ?>
<?php echo $form->error($model,'FK5_MZGTEVENTOS_INV_MZGTPERSONAS_PK'); ?>
</div> </div>
<div class="row"> <div class="row">
<?php echo $form->labelEx($model,'MZGTEVENTOS_FECHAREGISTRO'); ?> <?php echo $form->labelEx($model,'MZGTEVENTOS_FECHAREGISTRO'); ?>
......
...@@ -65,12 +65,7 @@ $('.search-form form').submit(function(){ ...@@ -65,12 +65,7 @@ $('.search-form form').submit(function(){
'MZGTEVENTOS_CARRERA', 'MZGTEVENTOS_CARRERA',
'MZGTEVENTOS_DEPARTAMENTO', 'MZGTEVENTOS_DEPARTAMENTO',
'MZGTEVENTOS_EVIDENCIAS', 'MZGTEVENTOS_EVIDENCIAS',
array(
'name'=>'FK5_MZGTEVENTOS_INV_MZGTPERSONAS_PK',
'value'=>'GxHtml::valueEx($data->)',
'filter'=>GxHtml::listDataEx(::model()->findAllAttributes(null, true)),
),
'MZGTEVENTOS_FECHAREGISTRO',
*/ */
array( array(
'class' => 'CButtonColumn', 'class' => 'CButtonColumn',
......
...@@ -46,11 +46,6 @@ array( ...@@ -46,11 +46,6 @@ array(
'MZGTEVENTOS_CARRERA', 'MZGTEVENTOS_CARRERA',
'MZGTEVENTOS_DEPARTAMENTO', 'MZGTEVENTOS_DEPARTAMENTO',
'MZGTEVENTOS_EVIDENCIAS', 'MZGTEVENTOS_EVIDENCIAS',
array(
'name' => 'fK5MZGTEVENTOSINVMZGTPERSONASPK',
'type' => 'raw',
'value' => $model->fK5MZGTEVENTOSINVMZGTPERSONASPK !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->fK5MZGTEVENTOSINVMZGTPERSONASPK)), array('/view', 'id' => GxActiveRecord::extractPkValue($model->fK5MZGTEVENTOSINVMZGTPERSONASPK, true))) : null,
),
'MZGTEVENTOS_FECHAREGISTRO', 'MZGTEVENTOS_FECHAREGISTRO',
), ),
)); ?> )); ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment