public function indexAction() { $measurementunitModel = new MeasurementunitModel(); $measurementunitData = $measurementunitModel->fetchAll($measurementunitModel->getAllMeasurementUnit()); $this->view->measurementunitData = $measurementunitData; $attributeModel = new AttributeModel(); $attributeData = $attributeModel->fetchAll($attributeModel->getAllAtribute()); $this->view->attributeData = $attributeData; // $controllerName = $this->getRequest()->getControllerName(); // $actionName = $this->getRequest()->getActionName(); // $cdwindow = $this->getCdWindow($controllerName,$actionName); // $_SESSION['cdwindow']=$cdwindow; }
public function alterAction() { $cdsupply = $this->_request->getParam("cdsupply"); $modelSupplyType = new SupplytypeModel(); $supplyTypeData = $modelSupplyType->fetchAll($modelSupplyType->getAllSupplytype()); $this->view->supplyTypeData = $supplyTypeData; $modelMeasureMentunit = new MeasurementunitModel(); $measureMentunitData = $modelMeasureMentunit->fetchAll($modelMeasureMentunit->getAllMeasurementUnit()); $this->view->measureMentunitData = $measureMentunitData; $modelSupplyflowtype = new SupplyflowtypeModel(); $SupplyflowtypeData = $modelSupplyflowtype->fetchAll($modelSupplyflowtype->getAllSupplyFlowType()); $this->view->supplyflowtypeData = $SupplyflowtypeData; $modelsupplysupplyflowtype = new SupplysupplyflowtypeModel(); $supplysupplyflowtype = $modelsupplysupplyflowtype->fetchAll($modelsupplysupplyflowtype->getSupplySupplyFlowTypeByCdSupply($cdsupply)); $this->view->supplysupplyflowtype = $supplysupplyflowtype; $modelSupply = new SupplyModel(); $supplyData = $modelSupply->fetchRow($modelSupply->getSupplyFlowTypeByCdSupply($cdsupply)); $this->view->supply = $supplyData; // print_r($supplyData); die; }
public function __construct() { parent::__construct(); $measurementunitModel = new MeasurementunitModel(); $measurementunitData = $measurementunitModel->fetchAll($measurementunitModel->getAllMeasurementUnit()); $this->_idattribute = new Zend_Form_Element_Text('idattribute'); $this->_idattribute->setDecorators($this->_decoratorsDefault); $this->_idattribute->setAttrib("id", "attribute_idattribute "); $this->_idattribute->setRequired(true); $this->_nmattribute = new Zend_Form_Element_Text('nmattribute'); $this->_nmattribute->setDecorators($this->_decoratorsDefault); $this->_nmattribute->setAttrib("id", "attribute_nmattribute"); $this->_nmattribute->setAttrib("class", "numeric"); $this->_nmattribute->setRequired(true); $this->_fgdatatype = new Zend_Form_Element_Select('fgdatatype'); $this->_fgdatatype->setRegisterInArrayValidator(false); $this->_fgdatatype->addMultiOptions(array('1' => 'Texto', '2' => 'Decimal', '3' => 'Inteiro', '4' => 'Data')); $this->_fgdatatype->setDecorators($this->_decoratorsDefault); $this->_fgdatatype->setAttrib("id", "attribute_fgdatatype"); $this->_fgdatatype->setRequired(false); $this->_nrminvalue = new Zend_Form_Element_Text('nrminvalue'); $this->_nrminvalue->setDecorators($this->_decoratorsDefault); $this->_nrminvalue->setAttrib("id", "attribute_nrminvalue"); $this->_nrminvalue->setRequired(false); $this->_cdattribute = new Zend_Form_Element_Text('cdattribute'); $this->_cdattribute->setDecorators($this->_decoratorsDefault); $this->_cdattribute->setAttrib("id", "attribute_cdattribute"); $this->_cdattribute->setRequired(false); $this->_vlminvalue = new Zend_Form_Element_Text('vlminvalue'); $this->_vlminvalue->setDecorators($this->_decoratorsDefault); $this->_vlminvalue->setAttrib("id", "attribute_vlminvalue"); $this->_vlminvalue->setRequired(false); $this->_vlmaxvalue = new Zend_Form_Element_Text('vlmaxvalue'); $this->_vlmaxvalue->setDecorators($this->_decoratorsDefault); $this->_vlmaxvalue->setAttrib("id", "attribute_vlmaxvalue"); $this->_vlmaxvalue->setRequired(false); $this->_dtminvalue = new Zend_Form_Element_Text('dtminvalue'); $this->_dtminvalue->setDecorators($this->_decoratorsDefault); $this->_dtminvalue->setAttrib("id", "attribute_dtminvalue"); $this->_dtminvalue->setRequired(false); $this->_dtmaxvalue = new Zend_Form_Element_Text('dtmaxvalue'); $this->_dtmaxvalue->setDecorators($this->_decoratorsDefault); $this->_dtmaxvalue->setAttrib("id", "attribute_dtmaxvalue"); $this->_dtmaxvalue->setRequired(false); $this->_nmstandardvalue = new Zend_Form_Element_Text('nmstandardvalue'); $this->_nmstandardvalue->setDecorators($this->_decoratorsDefault); $this->_nmstandardvalue->setAttrib("id", "attribute_nmstandardvalue"); $this->_nmstandardvalue->setRequired(false); $this->_nrmaxvalue = new Zend_Form_Element_Text('nrmaxvalue'); $this->_nrmaxvalue->setDecorators($this->_decoratorsDefault); $this->_nrmaxvalue->setAttrib("id", "attribute_nrmaxvalue"); $this->_nrmaxvalue->setRequired(false); $this->_cdmeasurementunit = new Zend_Form_Element_Select('cdmeasurementunit'); $this->_cdmeasurementunit->setRegisterInArrayValidator(false); foreach ($measurementunitData as $measurementunit) { $this->_cdmeasurementunit->addMultiOption($measurementunit->cdmeasurementunit, $measurementunit->nmmeasurementunit); } $this->_cdmeasurementunit->setDecorators($this->_decoratorsRequired); $this->_cdmeasurementunit->setAttrib("id", "attribute_cdmeasurementunit"); $this->_cdmeasurementunit->setRequired(true); }