コード例 #1
0
 public function execute()
 {
     try {
         if (request::getInstance()->hasRequest(pVentaTableClass::ID)) {
             $idFactura = request::getInstance()->getRequest(pVentaTableClass::ID);
             $fields = array(dpVentaTableClass::NUMERO_DOCUMENTO, dpVentaTableClass::PESO_ANIMAL, dpVentaTableClass::PRECIO_ANIMAL, dpVentaTableClass::ANIMAL_ID);
             $orderBy = array(dpVentaTableClass::ID);
             $where = array(dpVentaTableClass::NUMERO_DOCUMENTO => $idFactura);
             $page = 0;
             if (request::getInstance()->hasGet('page')) {
                 $page = request::getInstance()->getGet('page') - 1;
                 $page = $page * config::getRowGrid();
             }
             $f = array(detalleVacunacionTableClass::ID);
             $whereCnt = array(detalleVacunacionTableClass::ID => $id);
             $lines = config::getRowGrid();
             $this->cntPages = detalleVacunacionTableClass::getAllCount($f, true, $lines, $whereCnt);
             $this->objVacunacion = vacunacionTableClass::getAll($fieldsVacunacion, true, null, null, null, null, $whereVacunacion);
             $this->objDetalleVacunacion = detalleVacunacionTableClass::getAll($fields, true, $orderBy, 'ASC', 10, $page, $where);
             $this->defineView('view', 'vacunacion', session::getInstance()->getFormatOutput());
         } else {
             session::getInstance()->setError('pailas');
             routing::getInstance()->redirect('vacunacion', 'indexVacunacion');
         }
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
 public function execute()
 {
     try {
         if (request::getInstance()->hasRequest(detalleVacunacionTableClass::ID)) {
             $fields = array(detalleVacunacionTableClass::ID, detalleVacunacionTableClass::ID_REGISTRO, detalleVacunacionTableClass::VACUNA, detalleVacunacionTableClass::FECHA, detalleVacunacionTableClass::DOSIS);
             $where = array(detalleVacunacionTableClass::ID => request::getInstance()->getRequest(detalleVacunacionTableClass::ID));
             $fieldsVacuna = array(vacunaTableClass::ID, vacunaTableClass::NOMBRE_VACUNA);
             $fieldsVacunacion = array(vacunacionTableClass::ID);
             $this->objVacuna = vacunaTableClass::getAll($fieldsVacuna, true);
             $this->objVacunacion = vacunacionTableClass::getAll($fieldsVacuna, true);
             $this->objDetalleVacunacion = detalleVacunacionTableClass::getAll($fields, true, null, null, null, null, $where);
             $this->defineView('edit', 'detalleVacunacion', session::getInstance()->getFormatOutput());
         } else {
             routing::getInstance()->redirect('vacunacion', 'indexDetalleVacunacion');
         }
         //close if
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
 public function execute()
 {
     try {
         $fields = array(detalleVacunacionTableClass::ID, detalleVacunacionTableClass::ID_REGISTRO, detalleVacunacionTableClass::VACUNA, detalleVacunacionTableClass::FECHA, detalleVacunacionTableClass::DOSIS, detalleVacunacionTableClass::ACCION);
         $orderBy = array(detalleVacunacionTableClass::ID);
         $page = 0;
         if (request::getInstance()->hasGet('page')) {
             $page = request::getInstance()->getGet('page') - 1;
             $page = $page * config::getRowGrid();
         }
         //close if
         $f = array(detalleVacunacionTableClass::ID);
         $lines = config::getRowGrid();
         $this->cntPages = detalleVacunacionTableClass::getAllCount($f, true, $lines);
         $this->page = request::getInstance()->getGet('page');
         $this->objDetalleVacunacion = detalleVacunacionTableClass::getAll($fields, true, $orderBy, 'ASC', config::getRowGrid(), $page);
         log::register(i18n::__('view', null, 'empleado'), detalleVacunacionTableClass::getNameTable());
         $this->defineView('index', 'detalleVacunacion', session::getInstance()->getFormatOutput());
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }