protected function process()
 {
     $this->show_fs_toolbar = FALSE;
     $this->familia = new familia();
     if (isset($_POST['ncodfamilia'])) {
         $fam = new familia();
         $fam->codfamilia = $_POST['ncodfamilia'];
         $fam->descripcion = $_POST['ndescripcion'];
         if ($fam->save()) {
             Header('location: ' . $fam->url());
         } else {
             $this->new_error_msg("¡Imposible guardar la familia!");
         }
     } else {
         if (isset($_GET['delete'])) {
             $fam = new familia();
             $fam->codfamilia = $_GET['delete'];
             if ($fam->delete()) {
                 $this->new_message("Familia " . $_GET['delete'] . " eliminada correctamente");
             } else {
                 $this->new_error_msg("¡Imposible eliminar la familia " . $_GET['delete'] . "!");
             }
         }
     }
     if ($this->query != '') {
         $this->resultados = $this->familia->search($this->query);
     } else {
         $this->resultados = $this->familia->all();
     }
 }