コード例 #1
0
ファイル: SaveReviewForm.php プロジェクト: THM068/orangehrm
 public function getEmployeeListAsJson()
 {
     $companyService = new CompanyService();
     return $companyService->getEmployeeListAsJson();
 }
コード例 #2
0
 /**
  * Update User Group
  * @param sfWebRequest $request
  * @return unknown_type
  */
 public function executeUpdateUser(sfWebRequest $request)
 {
     $companyService = new CompanyService();
     $userService = new UserService();
     $user = $userService->readUser($request->getParameter('id'));
     $this->user = $user;
     if ($request->isMethod('post')) {
         $user->setIsAdmin($request->getParameter('isAdmin'));
         $user->setUserName($request->getParameter('txtUserName'));
         $user->setUserPassword($request->getParameter('txtUserPassword'));
         $user->setUsergId($request->getParameter('cmbUserGroupID'));
         $user->setStatus($request->getParameter('cmbUserStatus'));
         $user->setEmpNumber($request->getParameter('txtEmpId'));
         $userService->saveUser($user);
         $this->setMessage('SUCCESS', array(TopLevelMessages::SAVE_SUCCESS));
         $this->redirect('admin/listUser?isAdmin=' . $request->getParameter('isAdmin'));
     }
     $this->userType = $request->getParameter('isAdmin');
     $this->listUserGroup = $userService->getUserGroupList();
     $this->empJson = $companyService->getEmployeeListAsJson();
 }