public function updatescreeningAction()
 {
     $id = $this->_getParam('id', null);
     if (!isset($id) && !strlen($id)) {
         throw new AppEx\InvalidArgumentException('You must indicate a commercial group id');
     }
     $commercialGroup = $this->_cgSrv->load($id);
     // Check permissions
     $this->_helper->allowed('update', $commercialGroup);
     if (empty($commercialGroup)) {
         throw new NotFoundException("Commercial Group {$id} not found", 404);
     }
     $data = $this->_helper->requestData();
     $data = $this->_cgSrv->cleanDataForUpdateScreening($data);
     $data['id'] = $id;
     $commercialGroup->importData($data);
     $result = $this->_cgSrv->updateScreening($commercialGroup);
     // Response with the organization id
     $this->view->data = $result;
 }
 public function screeninglistsAction()
 {
     if (!$this->getRequest()->isPut()) {
         throw new AppEx\InvalidArgumentException('Screening list update must be a put request');
     }
     $commercialGroup = $this->_getCommercialGroup();
     // Check permissions
     $this->_helper->allowed('update', $commercialGroup);
     $data = $this->_helper->requestData(true, false);
     if (empty($data)) {
         return;
     }
     $data = $this->_cgSrv->cleanDataForUpdateScreening($data);
     $data['id'] = $commercialGroup->getId();
     $commercialGroup = $commercialGroup->importData($data);
     $result = $this->_cgSrv->updateScreening($commercialGroup);
     // Response with the organization id
     //         $this->view->data = $result;
 }