Пример #1
0
 public function execute()
 {
     $config = $this->getConfig();
     $cargo = new cargoTable($config);
     $id = filter_input(INPUT_GET, 'id');
     $cargo->setId($id);
     $cargo->delete();
     header('Location: ' . $config->getUrl() . 'index.php/cargo/index');
 }
Пример #2
0
 public function execute()
 {
     $config = $this->getConfig();
     $formcargo = filter_input_array(INPUT_POST)['cargo'];
     $cargo = new cargoTable($config);
     $cargo->setId($formcargo['id']);
     $cargo->setDescripcion($formcargo['descripcion']);
     $this->objcargo = $cargo->update();
     header('Location: ' . $config->getUrl() . 'index.php/cargo/index');
     exit;
 }