function deleteAction() { $pguid = $this->_getParam('id') ? $this->_getParam('id') : ''; $hol = new Pandamp_Core_Hol_Poll(); try { $hol->delete($pguid); $message = $pguid . " has been deleted successfully"; } catch (Exception $e) { $message = $e->getMessage(); } $this->view->message = $message; $this->_helper->layout()->headerTitle = "Polling"; }
function deleteAction() { $pguid = $this->_getParam('pguid') ? $this->_getParam('pguid') : ''; $hol = new Pandamp_Core_Hol_Poll(); try { $hol->delete($pguid); $response['success'] = true; $response['message'] = "Poll Deletion Success"; } catch (Exception $e) { $response['success'] = false; $response['error'] = $e->getMessage(); } echo Zend_Json::encode($response); }