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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1645 - (show 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 <?php
2 //$Id$
3 //gen openMairie le 11/04/2013 15:50
4
5 require_once ("../obj/om_dbform.class.php");
6
7 class rivoli_gen extends om_dbform {
8 var $table="rivoli";
9 var $clePrimaire="rivoli";
10 var $typeCle="A";
11 var $required_field=array(
12 "libelle",
13 "rivoli"
14 );
15 var $retourformulaire;
16
17 function setvalF($val) {
18 //affectation valeur formulaire
19 $this->valF['rivoli'] = $val['rivoli'];
20 $this->valF['libelle'] = $val['libelle'];
21 }
22
23 //==========================
24 // Formulaire [form]
25 //==========================
26
27 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 if ($maj==3){ //consulter
42 $form->setType('rivoli','static');
43 $form->setType('libelle','static');
44 }//fin consulter
45 }
46 /**
47 * Methode setTaille
48 */
49 function setTaille(&$form, $maj) {
50 $form->setTaille("rivoli", 10);
51 $form->setTaille("libelle", 30);
52 }
53
54 /**
55 * Methode setMax
56 */
57 function setMax(&$form, $maj) {
58 $form->setMax("rivoli", 4);
59 $form->setMax("libelle", 40);
60 }
61
62
63 function setLib(&$form,$maj) {
64 //libelle des champs
65 $form->setLib('rivoli',_('rivoli'));
66 $form->setLib('libelle',_('libelle'));
67 }
68
69 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 //==================================
77 // sous Formulaire [subform]
78 //==================================
79
80 function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
81 $this->retourformulaire = $retourformulaire;
82 }// fin setValsousformulaire
83
84 //==================================
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
97
98 }// fin classe
99 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26