/** * Index action. Displays employee list * * @param sfWebRequest $request */ public function executeCompanygeninfo(sfWebRequest $request) { $countryService = new CountryService(); $adminService = new CompanyService(); if ($request->isMethod('post')) { $company = new Company(); $company->setComCode($request->getParameter('txtCode')); $company->setComapanyName($request->getParameter('txtCompanyName')); $company->setFax($request->getParameter('txtFax')); $company->setNaics($request->getParameter('txtNAICS')); $company->setPhone($request->getParameter('txtPhone')); $company->setTaxId($request->getParameter('txtTaxID')); $company->setCountry($request->getParameter('cmbCountry')); $company->setStreet1($request->getParameter('txtStreet1')); $company->setStreet2($request->getParameter('txtStreet2')); $company->setCity($request->getParameter('txtCity')); $company->setState($request->getParameter('txtState')); $company->setZipCode($request->getParameter('txtZIP')); $company->setComments($request->getParameter('txtComments')); $adminService->saveCompany($company); } $this->countryList = $countryService->getCountryList(); $this->provinceList = $countryService->getProvinceList(); $this->company = $adminService->getCompany(); }