public function examinationmaterialAction()
 {
     $cdmaterial = $this->_request->getParam("cdmaterial");
     $cdexaminationmaterial = $this->_request->getParam("cdexaminationmaterial");
     $examinationModel = new ExaminationModel();
     $examinationmaterialModel = new ExaminationmaterialModel();
     $materialModel = new MaterialModel();
     $attributeModel = new AttributeModel();
     $attributeEMModel = new attributeexaminationmaterialModel();
     $physicallocationModel = new PhysicallocationModel();
     $timeFrameModel = new TimeframeModel();
     $equipmentModel = new EquipmentModel();
     $supplyModel = new SupplyModel();
     $supplyCentreModel = new SupplycentreModel();
     if (isset($cdmaterial) && $cdmaterial != 0) {
         $dataMaterial = $materialModel->fetchRow($materialModel->getMaterialByCd($cdmaterial));
         $nmmaterial = $dataMaterial["nmmaterial"];
         $this->view->examinationmaterialCDmaterial = $cdmaterial;
         $this->view->examinationmaterialNMmaterial = $nmmaterial;
     }
     if (isset($cdexaminationmaterial) && $cdexaminationmaterial != 0) {
         $fginterfacingvalue = $examinationmaterialModel->fetchRow($examinationmaterialModel->getFGInterfacingByExaminationMaterial($cdexaminationmaterial));
         $this->addInterfaceCheckbox($fginterfacingvalue['fginterfacing']);
         $this->view->cdexaminationmaterial = $cdexaminationmaterial;
     } else {
         $this->addInterfaceCheckbox('2');
     }
     $subexaminationData = $examinationModel->fetchAll();
     $this->view->subexaminationData = $subexaminationData;
     $materialData = $materialModel->fetchAll();
     $this->view->materialData = $materialData;
     // GET attributos relacionados ao material
     $attributeData = $attributeEMModel->fetchAll($attributeEMModel->getAttributeExaminationMaterial($cdexaminationmaterial));
     $this->view->attributeData = $attributeData;
     $physicallocationParentData = $physicallocationModel->getParentLocation();
     $this->view->parentlocationData = $physicallocationParentData;
     $physicallocationChildData = $physicallocationModel->getLocationByParentNotNull();
     $this->view->parentlocationData = $physicallocationChildData;
     $timeFrameData = $timeFrameModel->fetchAll($timeFrameModel->getAllTimeFrames());
     $this->view->timeFrameData = $timeFrameData;
     $equipmentData = $equipmentModel->fetchAll();
     $this->view->equipmentData = $equipmentData;
     $itemData = $supplyModel->fetchAll();
     $this->view->itemMaterialData = $itemData;
     $supplyCentreData = $supplyCentreModel->fetchAll();
     $this->view->supplyCentreData = $supplyCentreData;
 }
 public function examinationprepmaterialAction()
 {
     $examinationModel = new ExaminationmaterialModel();
     $cdmaterial = $this->_request->getParam("cdmaterial");
     $dataMaterial = $examinationModel->fetchRow($examinationModel->getMaterial($cdmaterial));
     $dsprep = $dataMaterial["dsprep"];
     $this->view->examinationprepmaterial = $dsprep;
 }