/**
  * Delete employee attachments
  *
  * @param int $empNumber Employee number
  *
  * @return boolean true if successfully deleted, false otherwise
  */
 public function execute($request)
 {
     $this->form = new EmployeeAttachmentDeleteForm(array(), array('name' => 'visita'), true);
     $this->form->bind($request->getParameter($this->form->getName()));
     if ($this->form->isValid()) {
         $empId = $request->getParameter('EmpID', false);
         if (!$empId) {
             throw new PIMServiceException("No Employee ID given");
         }
         if (!$this->IsActionAccessible($empId)) {
             $this->forward(sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
         }
         $attachmentsToDelete = $request->getParameter('chkattdelvc', array());
         if ($attachmentsToDelete) {
             $service = new EmployeeService();
             $service->deleteEmployeeAttachments($empId, $attachmentsToDelete);
             $this->getUser()->setFlash('visita.success', __(TopLevelMessages::DELETE_SUCCESS));
         }
     }
     $this->redirect($this->getRequest()->getReferer() . '#attachments');
 }