Exemplo n.º 1
0
 public function listAction()
 {
     $companyModel = new CompanyModel();
     $departmentModel = new DepartmentModel();
     $companyAffiliatesData = $companyModel->getAfilliatesByCompany();
     $companyParentData = $companyModel->getCompanyMatriz();
     $this->view->companyParentData = $companyParentData;
     $this->view->companyAffiliatesData = $companyAffiliatesData;
     $departmentparentData = $departmentModel->getAllParent();
     $this->view->departmentparentData = $departmentparentData;
     $departmentfilliatestData = $departmentModel->getDepartmentAfilliates();
     $this->view->departmentfilliatestData = $departmentfilliatestData;
     $controllerName = $this->getRequest()->getControllerName();
     $actionName = $this->getRequest()->getActionName();
     $cdwindow = $this->getCdWindow($controllerName, $actionName);
     $_SESSION['cdwindow'] = $cdwindow;
     $company = $this->_request->getParam("company");
     $department = $this->_request->getParam("department");
     $nmdepartment = $this->_request->getParam("nmdepartament");
     $this->view->company = $company;
     $this->view->department = $department;
     $this->view->nmdepartment = $nmdepartment;
     $userDataDepartamenData = new CompanyModel();
     $userDataCompanyDepartment = $userDataDepartamenData->fetchAll();
     $this->view->userDataCompanyDepartment = $userDataCompanyDepartment;
     $userDataDepartamentByCompany = $this->_model->fetchAll($this->_model->getAllDepartmentCompany());
     $this->view->userDataDepartamentByCompany = $userDataDepartamentByCompany;
 }
 public function indexAction()
 {
     $companyModel = new CompanyModel();
     $departmentModel = new DepartmentModel();
     $companyAffiliatesData = $companyModel->getAfilliatesByCompany();
     $companyParentData = $companyModel->getCompanyMatriz();
     $this->view->companyParentData = $companyParentData;
     $this->view->companyAffiliatesData = $companyAffiliatesData;
     $departmentparentData = $departmentModel->getAllParent();
     $this->view->departmentparentData = $departmentparentData;
     $departmentfilliatestData = $departmentModel->getDepartmentAfilliates();
     $this->view->departmentfilliatestData = $departmentfilliatestData;
     //        var_dump($departmentfilliatestData);
     //        die();
 }