public function verpredioAction()
 {
     $this->_helper->getHelper('ajaxContext')->initContext();
     if ($this->getRequest()->isXmlHttpRequest()) {
         $this->_helper->layout->disableLayout();
         $this->view->mperson = $this->_request->getParam('mperson');
         $this->view->vnombre = $this->_request->getParam('vnombre');
         $this->view->vdirecf = $this->_request->getParam('vdirecf');
         $this->view->p_mhresum = $this->_request->getParam('mhresum');
         $this->view->p_mpredio = $this->_request->getParam('mpredio');
         $this->view->p_cperiod = $this->_request->getParam('cperiod');
         $parameters[] = $this->_request->getParam('mpredio');
         $parameters[] = $this->_request->getParam('mhresum');
         $parameters[] = $this->_request->getParam('cperiod');
         $dataAdapter = new Model_DataAdapter();
         $rows = $dataAdapter->executeAssocQuery("pl_function.ver_predio", $parameters);
         if (is_array($rows) && count($rows) > 0) {
             $this->view->mpredio = $rows[0];
             $parameters = array($rows[0]["dpredio"], $rows[0]["cperiod"]);
             $dataAdapter->saveQuery("tblPiso", "pl_function.listar_construccion", $parameters);
             $dataAdapter->saveQuery("tblInstalacion", "pl_function.listar_instalacion", $parameters);
             $dataAdapter->saveQuery("tblLindero", "pl_function.listar_lindero", $parameters);
             $dataAdapter->saveQuery("tblRustico", "pl_function.listar_caracteristica_rustico", $parameters);
             $pintar = new Libreria_Pintar();
             $val[] = array('ccodpre', $rows[0]['ccodpre'], 'val');
             $pintar->PintarValor($val);
         }
     }
 }
Пример #2
0
 public function registrarAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->getHelper('ajaxContext')->initContext();
     if ($this->getRequest()->isXmlHttpRequest()) {
         $name = $this->_request->getParam('name');
         $procedure = $this->_request->getParam('procedure');
         $print = $this->_request->getParam('print');
         $parameters = json_decode($this->_request->getParam('parameters'), true);
         $dataAdapter = new Model_DataAdapter();
         if ($print == 'true') {
             $rows = $dataAdapter->executeAssocQuery($procedure, $parameters);
             $this->_helper->viewRenderer->setNoRender();
             echo $this->_helper->json($rows);
         } else {
             $records = $dataAdapter->saveQuery($name, $procedure, $parameters);
             $this->view->name = $name;
             $this->view->records = $records;
         }
     }
 }