/** * Update CompanyLocation * @return unknown_type */ public function executeUpdateCompanyLocation(sfWebRequest $request) { $companyService = new CompanyService(); $companyLocation = $companyService->readLocation($request->getParameter('id')); $this->companyLocation = $companyLocation; if ($request->isMethod('post')) { $companyLocation->setLocName($request->getParameter('txtName')); $companyLocation->setLocCountry($request->getParameter('cmbCountry')); $companyLocation->setLocState($request->getParameter('txtState')); $companyLocation->setLocCity($request->getParameter('txtCity')); $companyLocation->setLocAdd($request->getParameter('txtAddress')); $companyLocation->setLocZip($request->getParameter('txtZipCode')); $companyLocation->setLocPhone($request->getParameter('txtPhone')); $companyLocation->setLocFax($request->getParameter('txtFax')); $companyLocation->setLocComments($request->getParameter('txtComments')); $companyService = new CompanyService(); $companyService->saveCompanyLocation($companyLocation); $this->setMessage('SUCCESS', array(TopLevelMessages::UPDATE_SUCCESS)); $this->redirect('admin/listCompanylocation'); } $countryService = new CountryService(); $this->countryList = $countryService->getCountryList(); $this->provinceList = $countryService->getProvinceList(); }