/**
  * @Route("/client/clientValid",name="clientValid")
  * @Template()
  */
 public function clientValidAction()
 {
     $id = $this->get('request')->request->get('id');
     $code = $this->get('request')->request->get('codeClient');
     $rs = $this->get('request')->request->get('rsClient');
     $cin = $this->get('request')->request->get('cinClient');
     $adr = $this->get('request')->request->get('adrClient');
     $mail = $this->get('request')->request->get('email');
     $tel = $this->get('request')->request->get('telClient');
     $statut = $this->get('request')->request->get('statut');
     $em = $this->getDoctrine()->getManager();
     if ($id == null) {
         $client = new Client();
         $client->setCode($code);
         $client->setRs($rs);
         $client->setCin($cin);
         $client->setAdr($adr);
         $client->setMail($mail);
         $client->setTel($tel);
         $client->setStatut($statut);
         $em->persist($client);
     } else {
         $client = $em->getRepository("DbSpDbBundle:Client")->find($id);
         $client->setCode($code);
         $client->setRs($rs);
         $client->setCin($cin);
         $client->setAdr($adr);
         $client->setMail($mail);
         $client->setTel($tel);
         $client->setStatut($statut);
     }
     $em->flush();
     return array('users' => '');
 }
 public function setCin($cin)
 {
     $this->__load();
     return parent::setCin($cin);
 }