public function indexAction()
 {
     $orgInfoModel = new Default_Model_Organisationinfo();
     $getorgData = $orgInfoModel->getorgrecords();
     if (!empty($getorgData)) {
         $orgdata = '';
         $deptModel = new Default_Model_Departments();
         $call = $this->_getParam('call');
         $popup = $this->getRequest()->getParam('popup');
         if ($call == 'ajaxcall' || $popup == 1) {
             $this->_helper->layout->disableLayout();
         }
         $dashboardcall = $this->_getParam('dashboardcall');
         $view = Zend_Layout::getMvcInstance()->getView();
         $objname = $this->_getParam('objname');
         $refresh = $this->_getParam('refresh');
         $unitId = intval($this->_getParam('unitId'));
         if (!isset($unitId)) {
             $unitId = '';
         }
         $data = array();
         $searchQuery = '';
         $searchArray = array();
         $tablecontent = '';
         if ($refresh == 'refresh') {
             if ($dashboardcall == 'Yes') {
                 $perPage = DASHBOARD_PERPAGE;
             } else {
                 $perPage = PERPAGE;
             }
             $sort = 'DESC';
             $by = 'd.modifieddate';
             $pageNo = 1;
             $searchData = '';
             $searchQuery = '';
             $searchArray = '';
         } else {
             $sort = $this->_getParam('sort') != '' ? $this->_getParam('sort') : 'DESC';
             $by = $this->_getParam('by') != '' ? $this->_getParam('by') : 'd.modifieddate';
             if ($dashboardcall == 'Yes') {
                 $perPage = $this->_getParam('per_page', DASHBOARD_PERPAGE);
             } else {
                 $perPage = $this->_getParam('per_page', PERPAGE);
             }
             $pageNo = $this->_getParam('page', 1);
             $searchData = $this->_getParam('searchData');
             $searchData = rtrim($searchData, ',');
             $searchQuery = '';
             $searchArray = array();
             $tablecontent = '';
         }
         $dataTmp = $deptModel->getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $unitId);
         array_push($data, $dataTmp);
         $this->view->dataArray = $data;
         $this->view->call = $call;
         $this->view->messages = $this->_helper->flashMessenger->getMessages();
     } else {
         $orgdata = 'noorgdata';
         $this->view->orgdata = $orgdata;
     }
 }