public function execute() { try { if (request::getInstance()->isMethod('POST') and request::getInstance()->isAjaxRequest()) { $id = request::getInstance()->getPost(proveedorTableClass::getNameField(proveedorTableClass::ID, true)); $ids = array(proveedorTableClass::ID => $id); $this->arrayAjax = array('code' => 11, 'msg' => 'La eliminacion ha sido exitosa'); proveedorTableClass::delete($ids, true); $this->defineView('delete', 'proveedor', session::getInstance()->getFormatOutput()); } else { routing::getInstance()->redirect('personal', 'indexProveedor'); } } catch (PDOException $exc) { session::getInstance()->setFlash('exc', $exc); routing::getInstance()->forward('shfSecurity', 'exception'); } }