public function indexAction() { try { $cMapper = new Gyuser_Model_ClientTypesDataMapper(); $cList = $cMapper->fetchAll(); $adminObj = new Gyuser_Model_Admin(); $adminObj->setId(1); $adminMapper = new Gyuser_Model_AdminDataMapper(); $adminObj = $adminMapper->find($adminObj); $userType = new Gyuser_Model_UserType(); $this->view->admin = $adminObj; $this->view->authDetail = $this->authDetail; } catch (Exception $e) { echo $e; } }
public function deleteclienttypeajaxAction() { try { $request = $this->getRequest(); if ($this->getRequest()->isPost()) { $mapper = new Gyuser_Model_ClientTypesDataMapper(); $Obj = new Gyuser_Model_ClientTypes(); $Obj->setId($request->id); $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $result = $mapper->delete($Obj); if ($result) { echo $result; } else { echo "f"; } } } catch (Exception $e) { echo $e; } }