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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 342 - (hide annotations)
Mon Jul 2 09:36:56 2012 UTC (12 years, 7 months ago) by fraynaud
File size: 2693 byte(s)
openfoncier version sig wms


1 fraynaud 3 <?php
2     //$Id$
3 fraynaud 342 //gen openMairie le 28/06/2012 16:26
4 atreal 307 require_once ("../obj/om_dbform.class.php");
5 fraynaud 3
6 atreal 307 class civilite_gen extends om_dbform {
7     var $table="civilite";
8     var $clePrimaire="civilite";
9     var $typeCle="A";
10     var $retourformulaire;
11 fraynaud 3
12 atreal 307 function setvalF($val) {
13 fraynaud 342 //affectation valeur formulaire
14 atreal 307 $this->valF['civilite'] = $val['civilite'];
15     }
16 fraynaud 3
17 atreal 307 //====================================
18     // verifier avant validation [verify]
19     //=====================================
20 fraynaud 118 /**
21     * Methode verifier
22     */
23     function verifier($val = array(), &$db = NULL, $DEBUG = false) {
24     // On appelle la methode de la classe parent
25     parent::verifier($val, $db, $DEBUG);
26     // On verifie si le champ n'est pas vide
27     if ($this->valF[''] == "") {
28     $this->correct = false;
29     $this->addToMessage(_("Le champ")." "._("")." "._("est obligatoire"));
30     }
31     }
32 fraynaud 3
33    
34 atreal 307 //==========================
35     // Formulaire [form]
36     //==========================
37 fraynaud 3
38 atreal 307 function setType(&$form,$maj) {
39     //type
40     if ($maj==0){ //ajout
41     $form->setType('civilite','text');
42     }// fin ajout
43     if ($maj==1){ //modifier
44     $form->setType('civilite','hiddenstatic');
45     }// fin modifier
46     if ($maj==2){ //supprimer
47     $form->setType('civilite','hiddenstatic');
48     }//fin supprimer
49     }
50 fraynaud 3
51 atreal 307 function setOnchange(&$form,$maj) {
52     //javascript controle client
53     }
54     /**
55     * Methode setTaille
56     */
57     function setTaille(&$form, $maj) {
58     $form->setTaille("civilite", 20);
59     }
60 fraynaud 3
61 atreal 307 /**
62     * Methode setMax
63     */
64     function setMax(&$form, $maj) {
65     $form->setMax("civilite", 20);
66     }
67 fraynaud 3
68    
69 atreal 307 function setLib(&$form,$maj) {
70     //libelle des champs
71     $form->setLib('civilite',_('civilite'));
72     }
73 fraynaud 3
74 atreal 307 //==================================
75     // sous Formulaire [subform]
76     //==================================
77 fraynaud 3
78 atreal 307 function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
79     $this->retourformulaire = $retourformulaire;
80     }// fin setValsousformulaire
81 fraynaud 3
82 atreal 307 //==================================
83     // cle secondaire [secondary key]
84     //==================================
85 fraynaud 118 /**
86     * Methode clesecondaire
87     */
88     function cleSecondaire($id, &$db = NULL, $val = array(), $DEBUG = false) {
89     // On appelle la methode de la classe parent
90     parent::cleSecondaire($id, $db, $val, $DEBUG);
91     // Verification de la cle secondaire : proprietaire
92     $this->rechercheTable($db, "proprietaire", "civilite", $id);
93     }
94 fraynaud 3
95    
96     }// fin classe
97     ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26