Exemplo n.º 1
0
 /**
  * Update Project
  * @param sfWebRequest $request
  * @return unknown_type
  */
 public function executeUpdateProject(sfWebRequest $request)
 {
     $projectService = new ProjectService();
     $project = $projectService->getProjectById($request->getParameter('id'));
     $this->project = $project;
     if ($request->isMethod('post')) {
         $project->setCustomerId($request->getParameter('cmbCustomerId'));
         $project->setName($request->getParameter('txtName'));
         $project->setDescription($request->getParameter('txtDescription'));
         $projectService->saveProject($project);
         $this->setMessage('SUCCESS', array(TopLevelMessages::UPDATE_SUCCESS));
         $this->redirect('admin/listProject');
     }
     $companyService = new CompanyService();
     $customerService = new CustomerService();
     $this->listCustomer = $customerService->getCustomerList();
     $this->projectAdmins = $projectService->getProjectAdminByProjectId($project);
     $this->empJson = $companyService->getEmployeeListAsJson();
 }