コード例 #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;
 }
コード例 #2
0
 public function companyfiliatesAction()
 {
     $companyModel = new CompanyModel();
     $cdcompany = $this->_request->getParam("cdcompany");
     $companyAffiliatesData = $companyModel->getAfilliatesByCompany($cdcompany);
     $i = 0;
     foreach ($companyAffiliatesData as $row) {
         $id = "company_" . $row->cdcompany;
         $response->rows[$i]['cell'] = array($row->nmcompany, $id, $row->cdcompany);
         $i++;
     }
     $this->view->companyfiliates = $response;
 }