public function execute() { try { if (request::getInstance()->hasRequest(dpVentaTableClass::ID)) { $fields = array(dpVentaTableClass::ID, dpVentaTableClass::FECHA, dpVentaTableClass::USUARIO_ID, dpVentaTableClass::ANIMAL_ID, dpVentaTableClass::PESO_ANIMAL, dpVentaTableClass::PRECIO_ANIMAL); $where = array(dpVentaTableClass::ID => request::getInstance()->getRequest(dpVentaTableClass::ID)); $fields3 = array(usuarioBaseTableClass::ID, usuarioBaseTableClass::USER); $fields2 = array(animalBaseTableClass::ID); $fields4 = array(pVentaTableClass::ID); $this->objPventa = dpVentaTableClass::getAll4($fields4, false); $this->objUsuario = dpVentaTableClass::getAll3($fields3, true); $this->objAnimal = dpVentaTableClass::getAll2($fields2, false); $this->objdpVenta = dpVentaTableClass::getAll($fields, false, null, null, null, null, $where); $this->defineView('edit', 'dpVenta', session::getInstance()->getFormatOutput()); } else { routing::getInstance()->redirect('dpVenta', 'index'); } } catch (PDOException $exc) { echo $exc->getMessage(); echo '<br>'; echo '<pre>'; print_r($exc->getTrace()); echo '</pre>'; } }
public function execute() { try { $fields = array(dpVentaBaseTableClass::ID, dpVentaBaseTableClass::ANIMAL_ID); $fields2 = array(animalBaseTableClass::ID); $fields3 = array(usuarioBaseTableClass::ID, usuarioBaseTableClass::USER); $fields4 = array(pVentaBaseTableClass::ID); $this->objdpVenta = dpVentaTableClass::getAll($fields, false); $this->objAnimal = dpVentaTableClass::getAll2($fields2); $this->objUsuario = dpVentaTableClass::getAll3($fields3, false); $this->objPventa = dpVentaTableClass::getAll4($fields4, false); $this->defineView('insert', 'dpVenta', session::getInstance()->getFormatOutput()); } catch (PDOException $exc) { echo $exc->getMessage(); echo '<br>'; echo '<pre>'; print_r($exc->getTrace()); echo '</pre>'; } }