/[openfoncier]/trunk/gen/obj/rivoli.class.php
ViewVC logotype

Annotation of /trunk/gen/obj/rivoli.class.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1645 - (hide annotations)
Thu Apr 11 15:10:07 2013 UTC (11 years, 9 months ago) by nhaye
File size: 2958 byte(s)
Remise du framework sur le trunk, régénération

1 fraynaud 3 <?php
2     //$Id$
3 nhaye 1645 //gen openMairie le 11/04/2013 15:50
4 nhaye 410
5 atreal 307 require_once ("../obj/om_dbform.class.php");
6 fraynaud 3
7 atreal 307 class rivoli_gen extends om_dbform {
8     var $table="rivoli";
9     var $clePrimaire="rivoli";
10     var $typeCle="A";
11 nhaye 410 var $required_field=array(
12 fmichon 475 "libelle",
13     "rivoli"
14 nhaye 410 );
15 atreal 307 var $retourformulaire;
16 fraynaud 3
17 atreal 307 function setvalF($val) {
18 nhaye 410 //affectation valeur formulaire
19 atreal 307 $this->valF['rivoli'] = $val['rivoli'];
20     $this->valF['libelle'] = $val['libelle'];
21     }
22 fraynaud 3
23 atreal 307 //==========================
24     // Formulaire [form]
25     //==========================
26 fraynaud 3
27 atreal 307 function setType(&$form,$maj) {
28     //type
29     if ($maj==0){ //ajout
30     $form->setType('rivoli','text');
31     $form->setType('libelle','text');
32     }// fin ajout
33     if ($maj==1){ //modifier
34     $form->setType('rivoli','hiddenstatic');
35     $form->setType('libelle','text');
36     }// fin modifier
37     if ($maj==2){ //supprimer
38     $form->setType('rivoli','hiddenstatic');
39     $form->setType('libelle','hiddenstatic');
40     }//fin supprimer
41 nhaye 410 if ($maj==3){ //consulter
42     $form->setType('rivoli','static');
43     $form->setType('libelle','static');
44     }//fin consulter
45 atreal 307 }
46     /**
47     * Methode setTaille
48     */
49     function setTaille(&$form, $maj) {
50     $form->setTaille("rivoli", 10);
51     $form->setTaille("libelle", 30);
52     }
53 fraynaud 3
54 atreal 307 /**
55     * Methode setMax
56     */
57     function setMax(&$form, $maj) {
58     $form->setMax("rivoli", 4);
59     $form->setMax("libelle", 40);
60     }
61 fraynaud 3
62    
63 atreal 307 function setLib(&$form,$maj) {
64     //libelle des champs
65     $form->setLib('rivoli',_('rivoli'));
66     $form->setLib('libelle',_('libelle'));
67     }
68 fraynaud 3
69 nhaye 1645 function setSelect(&$form, $maj,&$db,$debug) {
70     if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php"))
71     include ("../sql/".$db->phptype."/".$this->table.".form.inc.php");
72     elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
73     include ("../sql/".$db->phptype."/".$this->table.".form.inc");
74     }// fin select
75    
76 atreal 307 //==================================
77     // sous Formulaire [subform]
78     //==================================
79 fraynaud 3
80 atreal 307 function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
81     $this->retourformulaire = $retourformulaire;
82     }// fin setValsousformulaire
83 fraynaud 3
84 atreal 307 //==================================
85     // cle secondaire [secondary key]
86     //==================================
87     /**
88     * Methode clesecondaire
89     */
90     function cleSecondaire($id, &$db = NULL, $val = array(), $DEBUG = false) {
91     // On appelle la methode de la classe parent
92     parent::cleSecondaire($id, $db, $val, $DEBUG);
93     // Verification de la cle secondaire : parcelle
94     $this->rechercheTable($db, "parcelle", "rivoli", $id);
95     }
96 fraynaud 3
97    
98     }// fin classe
99     ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26