public function edit()
 {
     $id = $this->getParam('id_departamento');
     $modelDepartamento = new departamentoModel();
     $resDepartamento = $modelDepartamento->getDepartamento('id_departamento=' . $id);
     $this->smarty->assign('registro', $resDepartamento[0]);
     $this->smarty->assign('title', 'Atualizar Departamento');
     $this->smarty->display('departamento/update.tpl');
 }
 public function edit()
 {
     //die();
     $id = $this->getParam('id');
     $modeldepartamento = new departamentoModel();
     $resdepartamento = $modeldepartamento->getDepartamento('codigo=' . $id);
     $this->smarty->assign('registro', $resdepartamento[0]);
     $this->smarty->assign('title', 'Editar Departamento');
     //call the smarty
     $this->smarty->display('departamento/edit.tpl');
 }
 public function edit()
 {
     $id = $this->getParam('id_produto');
     $modelProduto = new produtoModel();
     $resProduto = $modelProduto->getProduto('id_produto=' . $id);
     $departamento_model = new departamentoModel();
     $departamento_res = $departamento_model->getDepartamento('stat<>0');
     $this->smarty->assign('registro', $resProduto[0]);
     $this->smarty->assign('departamento', $departamento_res);
     $this->smarty->assign('id_choosen', $resProduto[0]['id_departamento']);
     $this->smarty->assign('title', 'Atualizar Produto');
     //call the smarty
     $this->smarty->display('produto/update.tpl');
 }
 public function edit()
 {
     //die();
     $id = $this->getParam('id');
     $modelproduto = new produtoModel();
     $resproduto = $modelproduto->getProduto('p.codigo=' . $id);
     $this->smarty->assign('registro', $resproduto[0]);
     //chama status
     $model_statusprod = new statusProdModel();
     $status_res = $model_statusprod->getStatus('');
     //Full table Scan :( or :)
     //send the records to template sytem
     $this->smarty->assign('listastatusprod', $status_res);
     //chama depto
     $model_deptoprod = new departamentoModel();
     $dpto_res = $model_deptoprod->getDepartamento('');
     $this->smarty->assign('listadeptoprod', $dpto_res);
     $this->smarty->assign('title', 'Editar Produto');
     //call the smarty
     $this->smarty->display('produto/edit.tpl');
 }