Beispiel #1
0
    def controleSaisie(self):
        if not (self.efGdh.valid() and self.cbEmetteur.valid()
                and self.cbDestinataire.valid()):
            tkMessageBox.showwarning(
                'Contrôle', 'Les champs en rouge sont absents ou incorrects')
            self.fenetre.focus_set()
            return False
        if not self.efNum.valid():
            tkMessageBox.showwarning('Contrôle',
                                     'Numéro de victime incorrect')
            self.notebook.selectpage(0)
            self.efNum.focus_set()
            return False
        else:
            if self.efNum.getvalue() == 'Auto':
                self.efNum.setvalue(Commun.getNumVict(self.root))
            else:
                self.efNum.setvalue(self.efNum.getvalue().zfill(5))
        if self.rbSexe.getvalue() == None:
            tkMessageBox.showwarning('Contrôle',
                                     'Indiquez le sexe de la victime')
            self.notebook.selectpage(0)
            self.rbSexe.component("H").focus_set()
            return False
        if not (self.efFreqVent.valid() and self.efFreqCirc.valid()):
            tkMessageBox.showwarning(
                'Contrôle', 'Les champs en rouge sont absents ou incorrects')
            self.notebook.selectpage(1)
            self.fenetre.focus_set()
            return False
        if self.rbConsc.getvalue() == None:
            tkMessageBox.showwarning('Contrôle',
                                     'Préciez l\'état de conscience')
            self.notebook.selectpage(1)
            self.rbConsc.component("Consciente").focus_set()
            return False

        return True
Beispiel #2
0
    def controleSaisie(self):
        #Contrôle de saisie
        if not (self.efGdh.valid() and self.efNum.valid()):
            tkMessageBox.showwarning(
                'Contrôle', 'Les champs en rouge sont absents ou incorrects')
            self.fenetre.focus_set()
            return False
        if not self.efNum.valid():
            tkMessageBox.showwarning('Contrôle',
                                     'Numéro de victime incorrect')
            self.efNum.focus_set()
            return False
        else:
            if self.efNum.getvalue() == 'Auto':
                self.efNum.setvalue(Commun.getNumVict(self.root))
            else:
                self.efNum.setvalue(self.efNum.getvalue().zfill(5))
        if self.rbSexe.getvalue() == None:
            tkMessageBox.showwarning('Contrôle',
                                     'Indiquez le sexe de la victime')
            self.rbSexe.focus_set()
            return False

        return True