public function dadosAction()
 {
     $this->_helper->layout->disableLayout();
     $page = $this->_request->getParam("page", 1);
     $limit = $this->_request->getParam("rows");
     $sidx = $this->_request->getParam("sidx", 1);
     $sord = $this->_request->getParam("sord");
     $equipModel = new EquipmentModel();
     $supplierModel = new SupplierModel();
     $servicesModel = new ServiceModel();
     $equip = $equipModel->fetchAll();
     $count = count($equip);
     if ($count > 0 && $limit != 0) {
         $total_pages = ceil($count / $limit);
     } else {
         $total_pages = 0;
     }
     if ($page > $total_pages) {
         $page = $total_pages;
     }
     // $supplycentre = $centerModel->fetchAll(null, "$sidx $sord", $limit, ($page*$limit-$limit));
     $response = new stdClass();
     $response->page = $page;
     $response->total = $total_pages;
     $response->records = $count;
     $i = 0;
     foreach ($equip as $row) {
         /* PEGA ÚLTIMO SERVIÇO */
         $ServiceEquip = $servicesModel->getLastService($row->cdequipment);
         $CalibEquip = $servicesModel->getLastCalib($row->cdequipment);
         $ManutEquip = $servicesModel->getLastManut($row->cdequipment);
         $ServiceSupplier = $ServiceEquip['nmsupplier'];
         $ServiceCalibDate = $CalibEquip['dtservice'];
         $ServiceManutSupplier = $ManutEquip['dtservice'];
         /*$CalibDate = new Zend_Date($ServiceCalibDate, 'YYYY-MM-dd HH:mm:ss');
           $CalibDate = $CalibDate->toString('dd-MM-YYYY');
           
           $ManutDate = new Zend_Date($ServiceManutSupplier, 'YYYY-MM-dd HH:mm:ss');
           $ManutDate = $ManutDate->toString('dd-MM-YYYY');*/
         /* PEGA O FABRICANTE */
         $SupplierEquip = $supplierModel->getNameSupplierByCd($row->cdsupplier);
         $supplier = $SupplierEquip->nmsupplier;
         //$response->rows[$i]['cdsupplier'] = $row->cdsupplier;
         $response->rows[$i]['cell'] = array($row->cdequipment, $row->idequipment, $row->nmequipment, $supplier, $ServiceSupplier, $ServiceManutSupplier, $ServiceCalibDate);
         $i++;
     }
     $this->view->dados = $response;
 }