/**
  * Ajout d'un Champ
  */
 public function addChamp()
 {
     $idProjet = $this->input->post('projet');
     // Insertion en base
     $model = new Champ_model();
     $model->chplbcde = $this->input->post('code');
     $model->chplbnom = $this->input->post('nom');
     $model->chpfgnul = $this->input->post('peutEtreNull');
     $model->chpcdtyp = $this->input->post('type');
     $model->chplbdes = $this->input->post('description');
     $model->objidobj = $this->input->post('idObjet');
     $model->save($this->db);
     $this->session->set_flashdata('message', formatInfo('Nouveau champ ajoute'));
     // Recharge la page avec les nouvelles infos
     redirect('editobjet/index/' . $model->objidobj . '/' . $idProjet . '#chp_' . $model->chpidchp);
 }
 /**
  * Ajout d'un Champ
  */
 public function add()
 {
     // Insertion en base
     $model = new Champ_model();
     $model->chpidchp = $this->input->post('identifiant');
     $model->chplbcde = $this->input->post('code');
     $model->chplbnom = $this->input->post('Nom');
     $model->chpfgnul = $this->input->post('peutEtreNull');
     $model->chpfgcle = $this->input->post('estCle');
     $model->chpcdtyp = $this->input->post('type');
     $model->chplbdes = $this->input->post('description');
     $model->objidobj = $this->input->post('idObjet');
     $model->save($this->db);
     $this->session->set_userdata('message', formatInfo('Nouveau Champ ajoute'));
     // Recharge la page avec les nouvelles infos
     redirect('listchamps/index');
 }