예제 #1
0
 def Ajouter(self, event):
     from Dlg import DLG_Saisie_contratpsu_conso
     dlg = DLG_Saisie_contratpsu_conso.Dialog(self, clsbase=self.clsbase)
     if dlg.ShowModal() == wx.ID_OK:
         listeConso = dlg.GetListeConso()
         listeTracks = []
         for dictConso in listeConso:
             listeTracks.append(Track(self.clsbase, dictConso))
         self.AddObjects(listeTracks)
         self.MAJ_label_page()
     dlg.Destroy()
예제 #2
0
 def Modifier(self, event):  
     if len(self.Selection()) == 0 :
        dlg = wx.MessageDialog(self, _(u"Vous n'avez sélectionné aucune consommation à modifier dans la liste !"), _(u"Erreur de saisie"), wx.OK | wx.ICON_EXCLAMATION)
        dlg.ShowModal()
        dlg.Destroy()
        return
     track = self.Selection()[0]
     from Dlg import DLG_Saisie_contratpsu_conso
     dlg = DLG_Saisie_contratpsu_conso.Dialog(self, clsbase=self.clsbase)
     dlg.SetConso(track)
     if dlg.ShowModal() == wx.ID_OK:
         track.dictValeurs = dlg.GetListeConso()[0]
         track.MAJ()
         self.RefreshObject(track)
         self.MAJ_label_page()
     dlg.Destroy()